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.
Hi All,
I'm trying to do a YoY Comparison for 2021 and 2020, so when I use the sameperiodlastyear it compares the exact same date last year but I want it to calculate one day ahead
For Ex: My date range is 19 Dec 2021 to 25 Dec 2021, it should compare 20 Dec 2020 to 26 Dec 2020
Kindly help!
Solved! Go to Solution.
@Naveeduddin , Try a measure like
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
If I may suggest other than the below, if you have calendar table with week number column, you can compare it by utilizing the same week number last year.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Thank you! This was helpful
Wow, Amazing! This worked. Thanks a lot
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
If I may suggest other than the below, if you have calendar table with week number column, you can compare it by utilizing the same week number last year.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Not by a computer however SAMEPERIODLASTYEAR returns a table of dates. I think you should just be able to wrap it in DATEADD.
Can flesh that out later if you need?
@Naveeduddin , Try a measure like
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAY))
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 |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |