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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Kurt4597
Helper I
Helper I

YoY on a graph

I am trying to create a year on graph from the following tables

 

Table 1: DateDim

Kurt4597_0-1684934982740.png


Table 2: Sales

Kurt4597_1-1684935022125.png

I will have the date on the datedim filter set as follows

Kurt4597_2-1684935463565.png

 

and the graph would look like this

Kurt4597_3-1684935498289.png

 

 

I am struggling on a way to do this. I could create a YoY measure but then plotting it on a graph is what I am stuck with. Any help would be much appreciated! Thank you all

 

Sample File - https://easyupload.io/lacpf5

 

1 ACCEPTED SOLUTION
Syk
Resident Rockstar
Resident Rockstar

Your previous year measure would be something like this

PY Sales = CALCULATE(SUM(Sales[Count]),DATEADD(Dim_date[Date],-1,year))

View solution in original post

3 REPLIES 3
Syk
Resident Rockstar
Resident Rockstar

Your previous year measure would be something like this

PY Sales = CALCULATE(SUM(Sales[Count]),DATEADD(Dim_date[Date],-1,year))
Syk
Resident Rockstar
Resident Rockstar

You can create this with measures or you can use the month and days as the axis (without year) and use year as the legend.

Syk_0-1684938288101.png

 

The issue I have with this method is that because the date filter only shows May 01/05/2023 - 21/05/2023 then it will filter out the line from previous year. Because of this, I think it is best to use a measure. Could you please assist?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.