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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jamesbb93
New Member

Matrix table using multiple columns

Hi,

 

Seasons greetings to everyone!  I'm hoping someone could help me with something I feel is pretty complex, but it's probably a simple fix!

 

I have a power query table with the following data (snippet below and fuller example of dataset attached)

IDDateTotal Trg Hours TotalAvoiding Action ScoreScan ScoreDivision of Attention Score
5401/12/202101:45-200
5603/12/202102:0010 
5703/12/202102:300 -1

 

I would like to show a COUNT of the data in a matrix table in the following format.

 -2-101
Avoiding Action1010
Scan0020
Division of Attention0110

 

To give a better example of just what I'm looking for, see PDF link of the report the table will be going into. I've managed to recreate exactly what I'm looking for using a UNION table, but because there's no relationships, it's not filterable against the rest of the report (problem!!)

 

Really hope someone can help with this.

 

Thanks in advance and Happy New Year!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jamesbb93 , Unpivot the columns from F to AB in your excel in power query, then you have both headers and values as columns, you can use them in matrix as row and column and count of any one as values

 

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

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

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Picture2.png

 

Result: =
CALCULATE (
COUNTROWS ( FILTER ( 'Table', 'Table'[Value] <> BLANK () ) ),
FILTER ( 'Table', 'Table'[Value] = MAX ( 'Table'[Value] ) )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@jamesbb93 , Unpivot the columns from F to AB in your excel in power query, then you have both headers and values as columns, you can use them in matrix as row and column and count of any one as values

 

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

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 @Jihwan_Kim I wasn't expecting such quick replies.

I went with the Unpivot route as it worked better with my data model.

 

Really appreciate the help!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.