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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mgradijan
Resolver I
Resolver I

cumulative months sales totals by month and then comparing last 3 years on line chart

I am still struggling with a line chart that shows monthly year to date totals in a line chart, with the last 3 years graphed.   Management wants something that looks like this....

mgradijan_0-1600978077931.png

 

I am using a financial date table with fiscal year, fiscal month beginning on Nov 1 and end Oct 31.  I can get PBI to graph out a month by month total, but can't figure out how to graph the cumulative sales month to month. I get the following: 

mgradijan_1-1600978403012.png

When I put my data into a matrix visual to see what I am working with, I get the month names on the Rows/ Fiscal Year on the columns/ and Sales Month to Date as the values.  Looks correct in a table format but again going to a line chart it doesn't want to work.  suggestions please. Marty

 

1 ACCEPTED SOLUTION

So the dax formulas that were suggested as an answer to my question about cumulative months sales , year over year, did not work for me.  ( I am definately not an expert in DAX which is probably the reason my dax formula attemps did not work for me). 

 

The solution I found came form watching "Guys in a Cube" youtube channel;

Do you need a date table for time intelligence in Power BI? Nope! (Quick Measures) 

 

I had already created a date table and by using the New quick measure option in the field that was presented in the video.  I created a quick measure for Sales running total in Fiscal Month.  Fiscal month was from my date table I created to set the first month to our first fiscal month of November.     

 

year to year comparison graphyear to year comparison graph

 

 

View solution in original post

7 REPLIES 7
v-jayw-msft
Community Support
Community Support

Hi @mgradijan ,

 

Did the above formula works for you? If it works for you, please consider mark the reply as solution.

If not, please share some sample data to us.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

The formula Invoiced sales YTD = CALCULATE ( SUM ( Invoice_Master[INVOICED SALES] ), DATESYTD ( 'Date Table'[Date])) did not solve the problem.

After playing around with that formula, I still get the following:

mgradijan_0-1601928852473.png

@mgradijan 

That screen shot is too small, I can't tell what is going on in the graph.

So the dax formulas that were suggested as an answer to my question about cumulative months sales , year over year, did not work for me.  ( I am definately not an expert in DAX which is probably the reason my dax formula attemps did not work for me). 

 

The solution I found came form watching "Guys in a Cube" youtube channel;

Do you need a date table for time intelligence in Power BI? Nope! (Quick Measures) 

 

I had already created a date table and by using the New quick measure option in the field that was presented in the video.  I created a quick measure for Sales running total in Fiscal Month.  Fiscal month was from my date table I created to set the first month to our first fiscal month of November.     

 

year to year comparison graphyear to year comparison graph

 

 

jdbuchanan71
Super User
Super User

@mgradijan 

If you have a calendar table it will be just something like this:

YTD Sales = CALCULATE([Sales Amount],DATESYTD('Date'[Date]))

Then put the month name on the axis and the year on the legend. 

jdbuchanan71_0-1600979404625.png

 

My formula for YTD sales was generated in pbi quick measure and the formula is: 
 
Invoices Sales YTD =
TOTALYTD(SUM('RJM_Invoices'[Invoiced Sales]), 'Date Table'[Date])

Change it to this.

Invoices Sales YTD =
CALCULATE ( SUM ( 'RJM_Invoices'[Invoiced Sales] ), DATESYTD ( 'Date Table'[Date] ) )

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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