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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Measures are not evaluating properly in the row subtotal level

Hello All,

I have the following measure 

For Today (Plan) = IF([MES_Passed]<[MES_Cumm Script Execution Plan Until Today],

[MES_Cumm Script Execution Plan Until Today]-[MES_Passed],

[MES_Cumm Script Execution Plan Until Today]-[MES_Cumm Script Execution Plan Until Yesterday])

Power BI Output :https://drive.google.com/open?id=1juAYttZmtry0bziDveNw4_WsTp_JoreS

But the desired output we are looking for is 

https://drive.google.com/open?id=1NFkWIuFC89PWyAaaPmcJqOmAyAqQEuTV

I have tried with HASONEVALUE while the row values are correct but the row subtotals/grand totals are not populated with the sum of "For Today (Plan)" column in Power BI.

MES_Cumm Script Execution Plan For Today = IF(OR(HASONEVALUE('Scenario Script Summary'[Testing team]),HASONEVALUE('Scenario Script Summary'[Scenario owning team])),
IF([MES_Passed]<[MES_Cumm Script Execution Plan Until Today],
[MES_Cumm Script Execution Plan Until Today]-[MES_Passed],
[MES_Cumm Script Execution Plan Until Today]-[MES_Cumm Script Execution Plan Until Yesterday])).

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

This is because PowerBI doesn't SUM the values of the measures in subtotals for matrices. Instead, it recalculates the measure with the entire subgroup as the dataset.   From the images you provided, it looks like subtotals/totals are calculating as expected in both.  If you're looking to enter 0 where you get a blank result, add zero to any mathematical expression to guarantee a value. I'm not sure how your data is structured, so it's hard for me to try and help you with DAX code directly.

 

You can read about my adventures trying to fight this behavior, and a description of how to calculate the subtotal differently than the values within the matrix here: https://community.powerbi.com/t5/Desktop/Only-Total-Select-Values-in-a-Matrix-amp-Formatting-Help/m-...

 

 

View solution in original post

1 REPLY 1
Cmcmahan
Resident Rockstar
Resident Rockstar

This is because PowerBI doesn't SUM the values of the measures in subtotals for matrices. Instead, it recalculates the measure with the entire subgroup as the dataset.   From the images you provided, it looks like subtotals/totals are calculating as expected in both.  If you're looking to enter 0 where you get a blank result, add zero to any mathematical expression to guarantee a value. I'm not sure how your data is structured, so it's hard for me to try and help you with DAX code directly.

 

You can read about my adventures trying to fight this behavior, and a description of how to calculate the subtotal differently than the values within the matrix here: https://community.powerbi.com/t5/Desktop/Only-Total-Select-Values-in-a-Matrix-amp-Formatting-Help/m-...

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.