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
Anonymous
Not applicable

Matrix total - turn into %

I have a matrix created where I have a Score column that contains Met and Not Met.  The counts look good but I would like to have the total be a % of the Met.  I'm assuming I need to create a measure?  If so, can anyone post the code for it please?

Capture.PNG

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Based on my research, You could try this way as below:

Step1:

Create a dim Score table like this:

3.JPG

Add an additional value "A" in it.

Step2:

Create the relationship between them as below:

4.JPG

Step3:

Create a measure like this

Measure 2 = 
IF (
    CALCULATE ( MIN ( 'Dim'[Score] ) ) = "A",
    FORMAT (
        DIVIDE (
            CALCULATE ( COUNTA ( 'Table'[Score] ), 'Table'[Score] = "Met" ),
            CALCULATE ( COUNTA ( 'Table'[Score] ) )
        ),
        "Percent"
    ),
    CALCULATE ( COUNTA ( 'Table'[Score] ) )
)

Step4:

Drag Score from dim table and measure into matrix visual

Result:

5.JPG

and here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Based on my research, You could try this way as below:

Step1:

Create a dim Score table like this:

3.JPG

Add an additional value "A" in it.

Step2:

Create the relationship between them as below:

4.JPG

Step3:

Create a measure like this

Measure 2 = 
IF (
    CALCULATE ( MIN ( 'Dim'[Score] ) ) = "A",
    FORMAT (
        DIVIDE (
            CALCULATE ( COUNTA ( 'Table'[Score] ), 'Table'[Score] = "Met" ),
            CALCULATE ( COUNTA ( 'Table'[Score] ) )
        ),
        "Percent"
    ),
    CALCULATE ( COUNTA ( 'Table'[Score] ) )
)

Step4:

Drag Score from dim table and measure into matrix visual

Result:

5.JPG

and here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lili6-msft This works but I can't believe there is not a simpler way. Also, this shows every row item including those that don't have data, I'm using a date slicer and items that don't occur in the filtered view are still showing but with no values. When I change the relationship to Both for Cross Filter, it removes the items that are empty but the % goes away

Greg_Deckler
Community Champion
Community Champion

Try clicking on the drop down arrow for the column in your Values area and choosing Show As | Percent of Grand Total.



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...
Anonymous
Not applicable

@Greg_Deckler  that changes all columns to a %. I only need the total to be a %

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.