The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Community
I need to compare the current year versus the last year, but my current year has only information from (Jan23 to Jul-23) qnd with this if I try to compare with the last year that hsa 12 months (Jan22 to Dec22) the comparission is wrong. so, Any idea how can I filter the last year according the period that I have in current year?
please provide some sample data in text form with an example of your expected result.
Proud to be a Super User!
Thanks, find enclosed the file with the example.
sorry I need text data, can you copy and paste it in
my internet was hanging and pushed accept as solution, apologies will try to remove it but can you please copy and past the text?
Proud to be a Super User!
here you go
DATA 2022 DATA 2023
Jan-22 1,000.00 Jan-23 5,000.00
Feb-22 2,000.00 Feb-23 3,500.00
Mar-22 1,000.00 Mar-23 1,000.00
Apr-22 2,000.00 Apr-23 5,000.00
May-22 1,000.00 May-23 3,500.00
Jun-22 1,400.00 Jun-23 1,000.00
Jul-22 1,400.00
Aug-22 1,400.00
Sep-22 1,400.00
Oct-22 1,400.00
Nov-22 1,400.00
Dec-22 1,400.00
Total 16,800.00 19,000.00
I used this example from SQLBI
https://www.sqlbi.com/articles/previous-year-up-to-a-certain-date/
You need to create a flag to assess when there is a value from the current year for previous year and then use that in your measure, and then it will only show you when have a value in both years.
see file attached.
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
71 | |
48 | |
41 |
User | Count |
---|---|
138 | |
108 | |
71 | |
64 | |
58 |