Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Simple data cleaning (split columns that contain multiple values)/data modelling question

Hello everybody,

 

I frequently run into the same issue that I have a solution for but I wonder if there are better ways or best practices. Image one column contains several values per row. That's an easy fix through using "split by..." in Power Query and creating a new row for each value. However, the new row contains all the values of the other columns. Hence, if at one point I want to find the simple sum of another column that contains integers, I cannot simply sum them anymore (due to the duplicate rows) - instead, I have to build a measure.

 

This is some random sample data:

ColorIDValueLocation
green, blue, yellow75c692ab-b0fd-4866-a441-5d8d2034daed34New York
green, blue6e3986c5-0b6f-4c6f-b6e3-c1bf8ac97e245Denver
reda208e7fa-b2b7-4807-8006-7f5cb6ea772034Miami
red27d834dd-ac11-4e2c-8834-727223a752ec87Denver
red2cb56594-472e-4672-9375-0c77426dc95b54New York
red, blue933e09ea-7b34-4c40-8a9f-7da18ba89eee23Miami
green, blue, redec45ecab-b652-41b9-a2ac-91cd855e7a623Miami
yellowebb9df48-24ef-4070-bff3-bd145387b8a04New York
green, blue, red, yellowc9fc4929-866c-4c0f-902b-741117ee3e64534Denver

 

The sum of value is 778 but after splitting the color columns, the simple sum without measure is 2482.

 

This is what the data model would look like after splitting the color column and here is the sample file: https://drive.google.com/file/d/1j6lkP4BMHWOpzq90NfbS7HaFzQPJAEmr/view?usp=sharing

 

funk0r_0-1694875227710.png

 

Thanks a lot, in advance!

2 REPLIES 2
jdbuchanan71
Super User
Super User

@Anonymous 

If I am understand your question, your model kind of does what I would suggest.  Your color table only needs to contain the color, split into a row for each like you have it, and the ID.  Then you link it to your upload table, like you have it with bi-directional.  Then you can sum the value from the upload table and show the breakdown by color from the color table.

jdbuchanan71_0-1694880860705.png

jdbuchanan71_2-1694880948249.png

 

 

Anonymous
Not applicable

Ha! And then, if a wanted to add a slicer for the color, I would add it from the color table.

In general, I can have however many dimension tables, and combine it with the value column from the original upload table, right?

 

Ok, I was close. Thank you 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.