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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello team. I am trying to compare data from different measures (say sales), so I have 2 tables 2022 and 2021. How can I compare these 2 figures to show a true comp figure?
Thanks in advance for the help
Jeff
Solved! Go to Solution.
Y'all rock. We got it covered many thanks for the replies!
Y'all rock. We got it covered many thanks for the replies!
Hi @JBell1979 ,
I am not sure if I understood your question correctly. If you want to compare the sales per month, you can create a Dates table and create the relationship. Then use the [Date.Month], [2021 Sales] and [2022 Sales] in matrix chart.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@JBell1979 , Create a date/year table and join with both. Create other common dimension too
Try measures like
Table having 2022
This Year = CALCULATE(sum('Table1'[Value]), FILTER(ALL('Date'),h'Date'[Year Rank]=max('Date'[Year Rank])))
Table having 2021
Last Year = CALCULATE(sum('Table2'[Value]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1))
You need select 2022 or should have 2022 as max
This year Today =
CALCULATE(sum('Table1'[Qty]), FILTER('Date',year('Date'[Date] )= year(today()) ) )
Last year Today =
CALCULATE(sum('Table2'[Qty]), FILTER('Date',year('Date'[Date] )= year(today()) -1) )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |