Forum Discussion
Measure does not show correct variance when pivot table filter context does not contain any value
- 4 years ago
Hi Anonymous ,
Please show grand totals in Excel. Does this match your desired output?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Please try the measure and change the subtotal label.
Measure =
VAR sum_scen1 =
CALCULATE ( SUM ( Table1[annual] ), Table1[A] = "Scen1" )
VAR sum_scen2 =
CALCULATE ( SUM ( Table1[annual] ), Table1[A] = "Scen2" )
RETURN
IF ( ISFILTERED ( Table1[A] ), SUM ( Table1[annual] ), sum_scen2 - sum_scen1 )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Thank you for your reply!
However, this solution does not seem to work in Excel Power Query/Power Pivot.
Would you please take a look at this again?
Thanks!
- v-kkf-msft4 years agoCommunity Support
Hi Anonymous ,
Please show grand totals in Excel. Does this match your desired output?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.