Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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:

 

Daily Sales_FY.PNG

 

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?

1 ACCEPTED SOLUTION

I tried creating an example of what you need. Can you refer to page and let me know what exactly you are looking for. I created two measures and added them to two graphs. https://www.dropbox.com/s/tu56wooipvoyoy3/CompareRange_timedim_YearTillDate.pbix?dl=0

Screenshot 2019-10-04 23.56.01.png

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

Can you please share the formula.

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.
 
2019_United_States_tornado_count
 
Ideally it would look like this....except for tornados it would be sales. Each line would be a different year.  Does this make sense?

I tried creating an example of what you need. Can you refer to page and let me know what exactly you are looking for. I created two measures and added them to two graphs. https://www.dropbox.com/s/tu56wooipvoyoy3/CompareRange_timedim_YearTillDate.pbix?dl=0

Screenshot 2019-10-04 23.56.01.png

Anonymous
Not applicable

Hello Amit,

 

I am trying to produce a running total of a planned payment column from 2019 to 2027.

Below is the DAX I used.

jitheshchathoth_0-1630050363991.png

But it does not produce the expected result.

 

jitheshchathoth_1-1630050421937.png

1. the staring value is moved from 2019 to 2019 and there is no value in 2019.

2. the running total is not right.

 

Could you please help?

 

Below is the link to the power Bi file.

https://1drv.ms/u/s!Asi-_ORlnzgVlnZMQWnBECqvjwPp?e=48WnMU

 

 

Refer page 9

Anonymous
Not applicable

hello @amitchandak ,

how did you do "date filter" in your project?

thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors