cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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....

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:

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
Resolver I

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 graph

7 REPLIES 7
Community Support

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.
Resolver I

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:

Super User

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

Resolver I

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 graph

Super User

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.

Resolver I
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])
Super User

Change it to this.

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