Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
53 | |
37 | |
31 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |