Forum Discussion
shubhamc_002
3 years agoHelper I
Cumulative Sum based on multiple filter context
Hi Team , Need one help on one scenario in DAX. I want to create a measure for cumulative sum which can Dynamically accept the external filter context without hardcoding in measure. Below meas...
amitchandak
3 years agoSuper User
shubhamc_002 , You should use a separate date table and try
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
or
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))
Running Total/ Cumulative: https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=41
You can consider Window function
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
Power BI Webinar- How to take advantage of New Power Bi Functions Offset,Window, Index:
https://youtube.com/live/exk8F5ka1Nw