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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
onevagi
Regular Visitor

Total % in the Matrix must be a measure to the table

Hi,

 

I have a DAX measure which is added to the values tab for the matrix. The Matrix includes Department like Home, Motor ; then Area which includes A, B, C (as example), and inlcudes 3 groups: Planned, Actual, and Difference. There are numbers are planned, actual na and Difference is calculated by Planned - Actual / 7.5. Now at the end it inlcudes Total with 2 other rows as Operational and Planning which are percentages. Total % is difference of Actual - Planning. I need this to be a measure in some other table. How to do it.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @onevagi ,

I create a table as you mentioned.

vyilongmsft_0-1723791088833.png

Then I create a calculated column and here is the DAX code.

Total % =
VAR _PlannedValue =
    CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Group] = "Planned" )
VAR _ActualValue =
    CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Group] = "Actual" )
RETURN
    ( _PlannedValue - _ActualValue ) / 7.5

Finally you will get what you want.

vyilongmsft_1-1723791728979.png

 

 

Best Regards

Yilong Zhou

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

2 REPLIES 2
Anonymous
Not applicable

Hi @onevagi ,

I create a table as you mentioned.

vyilongmsft_0-1723791088833.png

Then I create a calculated column and here is the DAX code.

Total % =
VAR _PlannedValue =
    CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Group] = "Planned" )
VAR _ActualValue =
    CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Group] = "Actual" )
RETURN
    ( _PlannedValue - _ActualValue ) / 7.5

Finally you will get what you want.

vyilongmsft_1-1723791728979.png

 

 

Best Regards

Yilong Zhou

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

Greg_Deckler
Community Champion
Community Champion

@onevagi Yours is a bit different but the same technique should apply here, you just need to identify the total row and in that case return your other measure.

First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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