Forum Discussion
Total Value not Summing Row Values?
- Anonymous2 years ago
Hi lbendlin ,thanks for the quick reply, I'll add more.
Hi shanestocks ,
It is recommended that you use the 'ISINSCOPE' function with the IF function
ISINSCOPE function (DAX) - DAX | Microsoft Learn
I assumed some simple data
Regarding your question, the row totals are calculated based on how they are calculated in your measure.Suppose I need to get the maximum value, but in the row total I need to calculate the sum of the maximum values, this will happen.
You need to store the maximum value in a virtual table you created, and then use the 'ISINSCOPE' function to perform calculations.
Measure 2 = VAR _table = SUMMARIZE('Table','Table'[Type],'Table'[group],"Value",[Measure]) //Create a virtual table to store values VAR _isParent = ISINSCOPE('Table'[group]) VAR _group = SELECTEDVALUE('Table'[group]) RETURN IF(_isParent = FALSE(), SUMX(_table,[Value]), SUMX(FILTER(_table ,[group] = _group),[Value]) )Best Regards,
Wenbin Zhou
Remember that the total is computed differently than the row level (in a matrix visual you actually have FOUR different calculations).
Your sample data is insufficent. Provide at least two Visual Materials. Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.