Forum Discussion
Cumulative sum by columns
- 8 years ago
Hi nranito,
Do you want to get a output like below? Calculate the cumulative sum of Sales per day and group by Type.
If it is, you could refer to this measure.
Measure 2 = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[Type] ), 'Table1'[Day] <= MAX ( 'Table1'[Day] ) ) )If not, please share your data sample which could reproduce your scenario and your desired output.
Best Regards,
Cherry
Hi nranito,
Do you want to get a output like below? Calculate the cumulative sum of Sales per day and group by Type.
If it is, you could refer to this measure.
Measure 2 =
CALCULATE (
SUM ( Table1[Sales] ),
FILTER (
ALLEXCEPT ( 'Table1', Table1[Type] ),
'Table1'[Day] <= MAX ( 'Table1'[Day] )
)
)
If not, please share your data sample which could reproduce your scenario and your desired output.
Best Regards,
Cherry
It's just that, thank you!
Can you explain what "allexcept" does? I tried, as you pointed, using GROUP BY, with no success...
- v-piga-msft8 years agoResident Rockstar
Hi nranito,
You could have a view of AllEXCEPT function which introduce how to use it in more details.
Best Regards,
Cherry