cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kwats005 Frequent Visitor
Frequent Visitor

Line Not Showing Month Totals for Year Before

Hello all,

 

So I have year over year cumulative totals showing on a Line Chart and I cannot figure out how to show all month totals for previous years even though we are only in August. I would like to see the whole year's months so I can see how we did last year during November for example. Is there anything I can do here? 

Thank you!

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
kwats005 Frequent Visitor
Frequent Visitor

Re: Line Not Showing Month Totals for Year Before

Amy,

 

I have figured out my issue. Because my calendar table did not have any dates past today's date, the chart would not show future dates. The red line is still cummulative but it becomes constant because there has been nothing sold past the current date. Thank you for your help!

Capture.GIF

View solution in original post

5 REPLIES 5
kwats005 Frequent Visitor
Frequent Visitor

Re: Line Not Showing Month Totals for Year Before

If I change the year to 2018 then all the data shows up for that year and the year before since there was data already for 2018, so I am thinking it's just because my calendar table is only up until today. 

CheenuSing Super Contributor
Super Contributor

Re: Line Not Showing Month Totals for Year Before

Hi @kwats005 ,

 

Can you load the pbix to Google or OneDrive and share the link to find a solution.

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Community Support Team
Community Support Team

Re: Line Not Showing Month Totals for Year Before

Hi @kwats005 ,

 

You may create calendar table first of all, create relationship between your data table and calendar table on date field, then create measures like DAX below.

 

DateDim= CALENDARAUTO()
 
This Year= TOTALYTD(SUM(Table1[Sales]),'DateDim'[Date])
 
Last Year = CALCULATE(SUM(Table1[Sales]),DATEADD('DateDim'[Date],-1,YEAR))
 
2 Year ago = CALCULATE(SUM(Table1[Sales]),DATEADD('DateDim'[Date],-2,YEAR))
 
3 Year ago = CALCULATE(SUM(Table1[Sales]),DATEADD('DateDim'[Date],-3,YEAR))
 
4 Year ago = CALCULATE(SUM(Table1[Sales]),DATEADD('DateDim'[Date],-4,YEAR))

Or could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

kwats005 Frequent Visitor
Frequent Visitor

Re: Line Not Showing Month Totals for Year Before

Hello Amy, 

 

Thank you for your response, I was creating a PowerBI with example data to show you the issue I am having and it set up perfectly with no issues. It is showing the whole previous year cumulative total. I am going to rewrite my formulas and try again in my original doc today. I think I must have a filter on that is messing up the visual. Untitled.png

Thank you for your help!

kwats005 Frequent Visitor
Frequent Visitor

Re: Line Not Showing Month Totals for Year Before

Amy,

 

I have figured out my issue. Because my calendar table did not have any dates past today's date, the chart would not show future dates. The red line is still cummulative but it becomes constant because there has been nothing sold past the current date. Thank you for your help!

Capture.GIF

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (4,702)