Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am trying to create a year on graph from the following tables
Table 1: DateDim
Table 2: Sales
I will have the date on the datedim filter set as follows
and the graph would look like this
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
Solved! Go to Solution.
Your previous year measure would be something like this
PY Sales = CALCULATE(SUM(Sales[Count]),DATEADD(Dim_date[Date],-1,year))
Your previous year measure would be something like this
PY Sales = CALCULATE(SUM(Sales[Count]),DATEADD(Dim_date[Date],-1,year))
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.
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?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |