Forum Discussion
Cumulative/Running total with condition
Hello Power BI Community,
I need your help please to calculate a new measure based on an other measure who gives only the values for the concerning start month like below.
I need to calculate a measure to make a running total for the future months with the same value like a monthly subsciption in witch the customer will pay the same value every month.
But there is an exeption: If the colum "Non Recurring"= Yes => it's like a oneshot payment so we should not apply the projection.
I start with the formula below to have the projection for the future months :
But i need to add a condition based on "Non Recurring" column the have a result like below:
For the second row we should have just 3,044.00 on 2023-01-01 and nothing for next months.
Thank you in advance for your help.
Best regards,
1 Reply
- amitchandak
Super User
MohammedCHRIFI , you should date table in formula and visual
examples
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
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
or try window
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
You can create a measure with filter if need and the create a running total