Forum Discussion
Blue-Space_34
2 years agoFrequent Visitor
Cumulative sum by year-month
Hello, I have this table that has a year-month column and a count by month. Please, note that the count refers to that particular year-month combination and sometimes you have more rows with the ...
Ashish_Mathur
Super User
2 years agoHi,
Create a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name column by the Month number. Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table. To your visual, drag Year and Month name from the Calendar Table. Write these measures:
S = sum(Data[count])
Running sum = calculate([S],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))
Hope this helps.