Forum Discussion
sneevand
5 years agoFrequent Visitor
Each Customer Total Rollup
YearValue MonthValue CustomerNo Qty 2019 1 1 10 2019 2 1 5 2019 3 2 20 2020 1 3 20 2020 2 2 5 2020 3 1 2 2020 1 1 10 We want to group by custome...
- 5 years ago
- 5 years ago
Hi sneevand ,
You can use the following measure for instead:
Measure = SUMX ( SUMMARIZE ( 'Table', 'Table'[CustomerNo], 'Table'[YearValue], "Total Qty", IF ( CALCULATE ( SUM ( 'Table'[Qty] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[CustomerNo] ), 'Table'[YearValue] = MAX ( 'Table'[YearValue] ) - 1 ) ) = 0, 0, CALCULATE ( SUM ( 'Table'[Qty] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[CustomerNo] ), 'Table'[YearValue] = MAX ( 'Table'[YearValue] ) ) ) ) ), [Total Qty] )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Ashish_Mathur
5 years agoSuper User