Forum Discussion
jsteffe
Helper III
4 years agoCumultive data for 3 different years on the same graph
Hello, I get a table with a column Date and a column numberOfParticipants I want to design the graph below : I want to get the cumulative sum of numbers per month for my all 3 years. Tha...
- 4 years ago
If I add The Year column in the legend, I get :
For year 2020, it cumulates the numbers of 2019 and 2020.
As I don't want to cumulate, amitchandak suggested to create 3 measures :YTDnb = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD('Calendar'[Date],"12/31"))YTDnb-1 = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD(dateadd('Calendar'[Date],-1,Year),"12/31"))YTDnb-2 = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD(dateadd('Calendar'[Date],-2,Year),"12/31"))and then I get the good result :Thanks to you rsbin and to amitchandak for your great help ...
rsbin
Community Champion
4 years agojsteffe
Helper III
4 years agoIf I add The Year column in the legend, I get :
For year 2020, it cumulates the numbers of 2019 and 2020.
As I don't want to cumulate, amitchandak suggested to create 3 measures :
YTDnb = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD('Calendar'[Date],"12/31"))
YTDnb-1 = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD(dateadd('Calendar'[Date],-1,Year),"12/31"))
YTDnb-2 = CALCULATE(SUM(Stages[nbParticipants]),DATESYTD(dateadd('Calendar'[Date],-2,Year),"12/31"))
and then I get the good result :
Thanks to you rsbin and to amitchandak for your great help ...