Forum Discussion

JT_MSUK's avatar
JT_MSUK
Icon for Advocate I rankAdvocate I
3 years ago

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:

 

Members = SUM(MemberData[Members])
 
Last 5 Years YTD = Calculate([Members],ALL(CalendarTable[Date].[Year]), USERELATIONSHIP(MemberData[Date],'CalendarTable DC'[Date]),DATESYTD(DATEADD('CalendarTable DC'[Date].[Date],0,YEAR)))
 
I'm not quite sure how to do the initial calculations bit to get the YTD, any advice appreciated.

4 Replies