Forum Discussion
Anonymous
5 years agoNot applicable
Sum based on another value
Hi Team, I have below screenshot for my data Table and Final output expected table. Thanks, KV's
- Anonymous5 years ago
HI Anonymous,
I'd like to suggest you add a variable to summary these records and use the iterator function(sumx) on this variable to apply second aggregations.
Measure = VAR summary = SUMMARIZE ( Table, [Month], "Diff", LOOKUPVALUE ( RawTable[Target], RawTable[VALUES], [Month] ) - LOOKUPVALUE ( RawTable[Target], RawTable[VALUES], "Total " & [Month] ) ) RETURN SUMX ( summary, [Diff] )The 'table' is a new calculate table with all month names, they are used as the category of table visual.
Regards,
Xiaoxin Sheng
Anonymous
5 years agoNot applicable
HI Anonymous,
I'd like to suggest you add a variable to summary these records and use the iterator function(sumx) on this variable to apply second aggregations.
Measure =
VAR summary =
SUMMARIZE (
Table,
[Month],
"Diff",
LOOKUPVALUE ( RawTable[Target], RawTable[VALUES], [Month] )
- LOOKUPVALUE ( RawTable[Target], RawTable[VALUES], "Total " & [Month] )
)
RETURN
SUMX ( summary, [Diff] )
The 'table' is a new calculate table with all month names, they are used as the category of table visual.
Regards,
Xiaoxin Sheng