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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors