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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Nickb167
Frequent Visitor

Display in table/matrix visual Count of number of occurrences of value in multiple columns

Hi,

 

Fairly new to PowerBi and a bit stuck on something that is probably fairly trivial. I have a data set from a SQL source that is essentially 1-5 ratings on a number of questions and it looks like the below:

 

Column1Column2Column3Column4Column5
44343
45454
24314
33234
34443
33535
41223
43344
21113
15111
34433
22111
13223
14112
33223
55325
15522
31133
45344

 

I need to display this in a table or matrix visual similar to below. 1 occurs 4 times in Column1, 2 occurs 3 times in Column1, 3 occurs 6 times in Colunm1m and so on.

 

 Column1Column2Column3Column4Column5
143552
231452
365548
455345
515212

 

I've tried various things and can't seem to get anything to work. Any help would be appreciated!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Nickb167 - See the attached PBIX below sig, Page 22. So in Power Query select all your columns, right-click Unpivot. Then see matrix layout on Page 22.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Nickb167
Frequent Visitor

Thanks for your help!!

amitchandak
Super User
Super User

@Nickb167 , Check file after Signature

1. Added index column. (Power Query)

2. Unpivoted -https://youtu.be/2HjkBtxSM0g

3. Created Rank Table, Enter Data

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Nickb167 , On the way, is to unpivot The table and then join it Rank (1-5, Need to there on Table)

https://radacad.com/pivot-and-unpivot-with-power-bi

And count the new column and pivot in Matrix

 

Another way is joining Rank(1-5, Need to there on Table) Table with All five columns, One active others inactive. Now create count measure with userelation

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@Nickb167 - See the attached PBIX below sig, Page 22. So in Power Query select all your columns, right-click Unpivot. Then see matrix layout on Page 22.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Nickb167 - You need to unpivot your columns, PBIX coming.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors