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
Vemul
Helper I
Helper I

Matrix data presentation for different groups

Hello Guru's 

 

I am new to power Bi and truing to work on Matric display. 

 

I have data for differnt groups with differnt types, I need to present data in Matrix table on individual section.  instead of creating multiple measures for each group is there any smart way that we can write single query to show details for individually.


Thanks for your support 

example 

data table 

GroupTypeCount
816CA5
816CA3
816CA4
995BA2
995BA7
995BA8
816CC3
995BC6
816CD1
816CD0
995BD5
995BD2
995BD7
995BS3
995BS5

 

Expected result 

GroupTypeCount
816CD1
816CA12
816CC3
816CTotal16
995BD7
995BA17
995BC6
995BS8
995BTotal38
7 REPLIES 7
Ray_Minds
Continued Contributor
Continued Contributor

Hi  @Vemul 

Create a Measure on the Count Column

Go to the Modeling tab in Power BI and create a new measure using the formula below:

Total Count = SUM(Table[Count])

This measure will calculate the total count for each combination of Group and Type.

  • Select the Matrix visual and add it to your report canvas.
  • Drag and drop the Group column, then the Type column under the Rows section and, Drag and drop the measure Total Count into the Values section.

    Ray_Minds_0-1752574565511.jpeg

v-saisrao-msft
Community Support
Community Support

Hi @Vemul,

We haven’t heard back from you in a while. If your issue has been resolved, Mark the relevant response as the solution to help fellow community members.
If you still need support, let us know if you still need assistance.

 

Thank You.

v-saisrao-msft
Community Support
Community Support

Hi @Vemul,

checking in to see if your issue has been resolved. If the response provided was helpful, kindly mark the helpful reply as the solution so that others with the same issue can benefit.
let us know if you still need assistance.

 

Thank You.

v-saisrao-msft
Community Support
Community Support

Hi @Vemul,

I hope you had a chance to review the solution shared by @danextian @MasonMA @rohit1991 . If it addressed your question, Consider accepting the helpful response as solution it helps others find answers more quickly.
If you're still facing the issue, feel free to reply, and we’ll be happy to assist further.

 

Thank you.

rohit1991
Super User
Super User

Hi @Vemul ,

You can achieve this in Power BI without creating multiple measures by leveraging the built-in Matrix visual and DAX’s “Show Values as” options.

Here’s how you can do it:

  1. Load your data into Power BI as a simple table (as in your example).

  2. Create a Matrix visual:

    • Drag the Group field into the Rows area.

    • Drag the Type field below Group in the Rows area (to create a hierarchy).

    • Drag the Count field into the Values area and set the aggregation to Sum (default).

  3. Enable subtotals to get the “Total” row for each group:

    • Click on the Matrix visual, go to the Format pane, and expand the “Subtotals” section.

    • Turn on “Row subtotals.” This will automatically show totals for each group, just as you expect.

  4. No need to create extra measures—Power BI Matrix will sum up the counts by Group and Type, and add totals for you.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
MasonMA
Impactful Individual
Impactful Individual

@Vemul 

I'd suggest you keep using Matrix table even though it does not render exactly the same format as in your second picture. 

I'd also recommend using Outline for Layout, disabling '+/- icon' under Row Header and only showing Subtotal for Row level 'Type'. 

MasonMA_0-1751764383099.png

 

MasonMA_1-1751764447719.png

MasonMA_3-1751764887934.png

 

 

 

danextian
Super User
Super User

Hi @Vemul 

You can use a matrix visual with an impicit measure

danextian_0-1751763351620.png

or an explicit one that sums the count column

Sum of Count =
SUM ( 'Table'[Count] )

This aside, your expected result doesnt match  your sample data. 995B should be 45 and not 38





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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