From the course: Power BI Data Methods

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Splitting and concatenating fields

Splitting and concatenating fields - Power BI Tutorial

From the course: Power BI Data Methods

Splitting and concatenating fields

- We can split a field into two or more fields based on a selected delimiter, number of characters or position. Conversely, we can combine them together by going the other way with delimiters and formulas. Let's first split our station ID for the NOAA stations into their country and the rest of the ID field in our NOAA station list. We see that the first two characters of the station ID represent the country code. To split it into two pieces, let's do this once by splitting it at position two, through the split column option. We'll choose two and we're going to split it as far left as possible once. This gives us the country code for our station ID that we can then use to perhaps filter or focus on a specific country. Merging our combining columns works the opposite of splitting the on a high level. Let's revisit our PDF query, where we obtain the weather data by day. Let's first rename the year, month, and day fields in the first three columns so they're easier to read. Right now…

Contents