Forum Discussion
Cumulative Spend
Hi I need to have a cumulative spend column in power bi but using different filters
Can someone help me on this one?
3 Replies
- amitchandakSuper User
midoban , Try if new Window function can help
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- midobanNew Member
hi amit,
here's a sample data in excel. same thing i want to show in power bi
- amitchandakSuper User
midoban , with help from window function
Cumm Based on supplier = CALCULATE([Spend], Window(1,ABS,0,REL, ALLSELECTED('Table'[supplier]),ORDERBY('Table'[Brand],asc)))
or
Cumm Based on supplier = CALCULATE([Spend], Window(1,ABS,0,REL, ALLSELECTED('Table'[supplier],'Table'[Brand]),ORDERBY('Table'[Brand],asc),,partitionBy('Table'[Brand])))