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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
netghoster
Frequent Visitor

How to Group Measures in Matrix Visualization

I am working on a dashboard to display all the key measures in a same visual. I am thinking to use Matrix. At highlevel I am looking for something like this below.

 

  FY23           FY24 
 MeasureP01P02P03P04P05P06P07P08P09P10P11P12P01P02
KPI Group1Measure1%%%%%%%%%%%%%%
 Measure2$$$$$$$$$$$$$$
KPI Group2Measure3UnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnit
 Measure4$$$$$$$$$$$$$$
 Measure5%%%%%%%%%%%%%%
KPI Group3Measure6UnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnit
 Measure7$$$$$$$$$$$$$$
 Measure8%%%%%%%%%%%%%%
 Measure9UnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnit
 Measure10$$$$$$$$$$$$$$
 Measure11%%%%%%%%%%%%%%
 Measure12UnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnitUnit
 Measure13$$$$$$$$$$$$$$
 Measure14%%%%%%%%%%%%%%

 

I already have all the measures created out of various fact tables. The chanllenge I am facing is that the KPI groups are not a dimension exists in any of the fact tables. They are only the how the business leaders want to group the measures based on the nature of the measures themself. How can I achieve this? Thank you in advance for any advice.

3 REPLIES 3
parry2k
Super User
Super User

@netghoster you can also look into show on rows option for the matrix visual on the format pane.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Greg_Deckler
Super User
Super User

@netghoster Create a disconnected table with the following data (Enter data query). See table below. You can then create a measure to return your other measures and use that in your matrix. You would use Group and Measure in an ad-hoc hierarchy for your rows.

 

Measure to Show = 
  VAR __Measure = MAX('Disconnected Table'[Measure])
  VAR __Result = 
    SWITCH( __Measure,
      "Measure1", [Measure1],
      "Measure2", [Measure2],
      "Measure3", [Measure3],
      "Measure4", [Measure4],
      "Measure5", [Measure5],
      "Measure6", [Measure6],
      "Measure7", [Measure7],
      "Measure8", [Measure8],
      "Measure9", [Measure9],
      "Measure10", [Measure10],
      "Measure11", [Measure11],
      "Measure12", [Measure12],
      "Measure13", [Measure13],
      [Measure14]
    )
RETURN
  __Result

 

Group Measure
KPI Group1 Measure1
KPI Group1 Measure2
KPI Group2 Measure3
KPI Group2 Measure4
KPI Group2 Measure5
KPI Group3 Measure6
KPI Group3 Measure7
KPI Group3 Measure8
KPI Group3 Measure9
KPI Group3 Measure10
KPI Group3 Measure11
KPI Group3 Measure12
KPI Group3 Measure13
KPI Group3 Measure14

 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thank you for the help. At least I managed to get the overall report structured the way it supposed to be. The caveat is that I lost the capability to manage the formatting at each individual measure since I have only one measure now. I managed to get the formating worked by using the formatting in the Switch function. I couldn't figure out how to get the conditional formatting to work. I need to color code the cells based on the target range of each measure.  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.