Forum Discussion
Cumulative Sum & Percentage Calculations Without Using Rank Dax
- 2 years ago
I have found the solution for this issue.
The final formula is
Total Filled YTD = TOTALYTD(SUM(Filled Bookings), DateTable[Date], "3-31")
Try this DAX:
Cumm Based on Date = CALCULATE(Sum(Table[Booking filled]) , Window(1,ABS,0,REL, Summarize(ALLSELECTED('Table'), Table[Vacancy Month Year], Table[Date Filled Month Year], Table[Date Filled Month Year Sort]),ORDERBY('Table'[Date Filled Month Year Sort],ASC), PARTITIONBY(Table[Vacancy Month Year]) ))
For information refer to this video/blog:
Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f
For the formula below, I don't have a column for 'Table'[Date Filled Month Year Sort], what would this entail please?
Cumm Based on Date = CALCULATE(Sum(Table[Booking filled]) , Window(1,ABS,0,REL, Summarize(ALLSELECTED('Table'), Table[Vacancy Month Year], Table[Date Filled Month Year], Table[Date Filled Month Year Sort]),ORDERBY('Table'[Date Filled Month Year Sort],ASC), PARTITIONBY(Table[Vacancy Month Year]) ))
I also tried using Example 2 from here - https://learn.microsoft.com/en-us/dax/window-function-dax but it didn't work with the PARTITIONBY.
I got this working instead but it is not doing a cumulative as shown in the example, possible due to the PARTITIONBY issue.
- Xavianna2 years ago
Helper I
I have found the solution for this issue.
The final formula is
Total Filled YTD = TOTALYTD(SUM(Filled Bookings), DateTable[Date], "3-31")