Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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!
User | Count |
---|---|
118 | |
75 | |
60 | |
50 | |
44 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |