Forum Discussion
Anonymous
5 years agoNot applicable
Cumulative Sum using DAX
Hi All, I have my data as below. ID OUTPUT_TYPE FORECASTED_MONTH FORECAST_QTY Cumm. FORECAST_QTY 1 NOMINAL 3 26 26 1 NOMINAL 6 27 54 1 NOMINAL 9 28 82 1 NOMINA...
- 5 years ago
Anonymous , Try like
Cummulative Qty New =
CALCULATE(
SUM('Forecasting'[FORECAST_QTY]),
FILTER(
allselected('Forecasting'),'Forecasting'[ID],'Forecasting'[OUTPUT_TYPE] max('Forecasting'[OUTPUT_TYPE]) &&
'Forecasting'[FORECAST_MONTH] <= MAX('Forecasting'[FORECAST_MONTH])
)
)
amitchandak
5 years agoSuper User
Anonymous , Try like
Cummulative Qty New =
CALCULATE(
SUM('Forecasting'[FORECAST_QTY]),
FILTER(
allselected('Forecasting'),'Forecasting'[ID],'Forecasting'[OUTPUT_TYPE] max('Forecasting'[OUTPUT_TYPE]) &&
'Forecasting'[FORECAST_MONTH] <= MAX('Forecasting'[FORECAST_MONTH])
)
)
- Anonymous5 years agoNot applicableHi amitchandak ,I have tried like below. But it is not working as expected.Cummulative Qty New = CALCULATE(SUM('Forecasting'[FORECAST_QTY]),FILTER(ALLSELECTED('Forecasting'),'Forecasting'[ID] = SELECTEDVALUE('Forecasting'[ID]) &&'Forecasting'[OUTPUT_TYPE] = max('Forecasting'[OUTPUT_TYPE]) &&'Forecasting'[FORECAST_MONTH] <= MAX('Forecasting'[FORECAST_MONTH])))
- Anonymous5 years agoNot applicable
Thank you amitchandak, it is working as expected. I had additional columns and hence it was not coming. Now I have removed and it is working fine