Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Running Total Chart over Multiple Years

Hello all,

 

Question regarding both DAX and getteing the correct chart.

 

Problem:  I want to plot multiple cumulative YTD sales plots on one plot/tile.  I have succesfully been able to do that for one FY but that is dependent on having a slicer of filter on it.  I'd like to do it for multiple years. The image Below should help illuminate where I am at and where I'd like to go:

 

 

The image above shows that I can plot one year of sales data over whatever period I have selected in the slicer.  In this case, the 2018-2019FY.

 

However, I'd like to plot the chart in blue ( I don't care about # of sales each day which is what the green line shows) fo the past five years. Ideally I'd have five line graphs with that same shape on the same plot.  Our sales are moving earlier in the fiscal year fall and later in the spring.  I'd like to be able to show this visually to executives.

 

Any help or ideas on how to set this up?

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sure. amitchandak 

       

      The code I am using to calculate the running total sales are the following:

       

      Measure = CALCULATE( SUM(SalesPerDate[Initiates]), FILTER (ALLSELECTED(SalesPerDate), SalesPerDate[Date] <= MAX(SalesPerDate[Date])))
       
      This is giving me the desired outcome of calculating the annual fiscal year todate running total per date with date on the x axis and sales on the y axis.  However, I want to add multiple years - not only the year that I select on the filter/slicer.
       
       
      Ideally it would look like this....except for tornados it would be sales. Each line would be a different year.  Does this make sense?