Forum Discussion
Cumulative sum
- 2 years ago
Add this measure or club: I still not understand the intention ...
Sales for Actual = CALCULATE( SUM('salesdata'[Sales ]), 'salesdata'[Actual/forecast] IN { "Actual" } ) Sales for Forecast = CALCULATE( SUM('salesdata'[Sales ]), 'salesdata'[Actual/forecast] IN { "Forecast" } ) CT Actual or Forecast = SUMX ( CALCULATETABLE( values(salesdata[Week ]), salesdata[Week ] <= MAX(salesdata[Week ])) , COALESCE( salesdata[Sales for Actual], [Sales for Forecast]) )If you dont want multiple measures, you can club the measure logic into one measure!
Hoep this helps!
- 2 years ago
I do NOT see any issue.
Check these screenshots:
a) No selection
b) with selection of Week 2, week 2
b) with selection of Week 1, Week 4
It works thanks a lot for your help; quick one please why this formula does not work when selecting multiple weeks from a slicer; say I want to have a table that shows week number, actual, forecast, ct actual if forecasts and use week column in a slicer so I can choose whatever week I want and display the results I also want to have the option to choose mutiple week and still get the results I want following the logic I explained earlier. Thank you 🙂
I do NOT see any issue.
Check these screenshots:
a) No selection
b) with selection of Week 2, week 2
b) with selection of Week 1, Week 4