Forum Discussion
Calculating the cumulative sum using a disconnected table
I had an issue yesterday with displaying the last 5 years on my graph dependent on year selected, which I solved using a disconnected table - it allows me to use my main CalendarTable for the Year and Month slicers.
The issue I now have is I cannot get the YTD values to display on my line graph, I can only seem to pull in the data by Month only (current measures below). The Disconnected Calendar Date heirachy is connected to the MemberData Table date as an inactive relationship:
4 Replies
- ChiragGarg2512
Solution Sage
, mark the table with date as date column instead of using .[year] .
For more reference:
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4Running Total/ Cumulative:
https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=42Continue 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- JT_MSUK
Advocate I
The disconnected table DATE column is already a date column with hierachy of month, day and year.
Do you mean remove Year from ALL(CalendarTable[Date].[Year])? If I remove Year it only shows the total for the month selected, the previous 4 years then disappear.
To display the last 5 years I have this in the filter as 1:
Last 5 Years =VAR YearSelection = SELECTEDVALUE(CalendarTable[Date])ReturnIF(AND(MAX('CalendarTable DC'[Date].[Year])<=YearSelection,MAX('CalendarTable DC'[Date].[Year])>=YearSelection-4),1,0)- ChiragGarg2512
Solution Sage