Forum Discussion
override total for calculation groups created in tabular editor
Hi, Does anyone know how to override totals with calculation groups created in tabular editor?
My total line for Sales and Weighted Average Cost are fine.
However, since the target cost is set by policy, I need to override the total for Target Cost (since it is not a sum, average, median, max..etc).
The target cost for each customer is the same # every month and will not change. Just like the total target cost. The goal is to compare the weighted average cost versus target cost.
Thanks a million!
Lisa
Lisa_2021 , You can use isfiltered or isinscope to change grand total
if(isinscope[Table[Customer]), [M1], [M2])
This should work in the calculation group. if you using selectedmeasure the it requires some calculation
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
2 Replies
- amitchandak
Super User
Lisa_2021 , You can use isfiltered or isinscope to change grand total
if(isinscope[Table[Customer]), [M1], [M2])
This should work in the calculation group. if you using selectedmeasure the it requires some calculation
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- Lisa_2021
Helper II
Thanks amitchandak! The isinscope function worked! Much appreciated!