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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
emman_burgonia
Frequent Visitor

Creating a Matrix based on the Column Values Separated by Comma

Hi all, I'm having trouble creating a matrix wherein the data from columns should be the values in the rows and get some information based on the other columns. The catch is the values are separated by comma

 

Here's the column where the values should be in the rows. I guess I need to unpivot the columns but the rest of the columns are being transposed. 

emman_burgonia_1-1664188522904.png

Here's the final output should look like:

 

emman_burgonia_0-1664188465840.png

 

I have also attached here the sample data Group by Accreditation.pbix

 

1 ACCEPTED SOLUTION

@emman_burgonia,

 

Yes, insert the new column in the same table where you split the rows. The value in Country will copy to the new rows after you split the column, so it should not affect the values.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
DataInsights
Super User
Super User

@emman_burgonia,

 

One approach is to split the column Accredited By into rows. After this step, create a Trim step to remove spaces.

 

DataInsights_0-1664219396224.png

 

Since the above step will result in the EM Enrolment Calculated amount being copied to each row, create a custom column in Power Query using the expression below. It divides the original amount in EM Enrolment Calculated by the number of values in Accredited By. This will enable you to sum this column in a measure and get the correct amount.

 

[EM Enrolment Calculated] / List.Count(Text.Split([Accredited By], ","))

 

For the Schools measure, you can use DISTINCTCOUNT.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi, thanks for the assistance. I'd like to ask where should I insert the new column? On the same table where I split my rows?

 

note that i'll also filter it further by country. Would that affect my values? 

@emman_burgonia,

 

Yes, insert the new column in the same table where you split the rows. The value in Country will copy to the new rows after you split the column, so it should not affect the values.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @DataInsights, how do I show the enrolment in the matrix? Note that I am also using enrolment data age for columns and I'd like to also include the EM Enrolment Calculated in there

@emman_burgonia,

 

Create a measure that sums the custom column created in Power Query. This new column should be used instead of [EM Enrolment Calculated].





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.