Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am looking to create a year over year comparison but based on the same date range. Basically I will have a selection date range which will take place in the current year, and I want to be able to show calculations for this year, as well as the sameperiod in a different variable year? So for example if I select the selection date range of Jan 30 2020 to Mar 28 2020, I want to be able to select another year say 2017, and it will show me the values for Jan 30 2017 to Mar 28 2017. I suspect this will be complicated but I want to check if it's possible and if I even want to attempt it.
Thanks
Solved! Go to Solution.
@id013 Probably some way using DATESINPERIOD perhaps or something else like that. Generally though, once you start to stray outside the lines a bit T"I" functions become more of a hassle than a help.
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
@id013
You can create a YearTable like below and provide a slider on the Year
Year | YearNo |
2018 | -1 |
2017 | -2 |
2016 | -3 |
2015 | -4 |
2014 | -5 |
2013 | -6 |
Then use the measure to calculate :
Measure =
CALCULATE(
[Total Sales],
DATEADD('DATE'[Date], SELECTEDVALUE('YearTable'[YearNo]),YEAR)
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@id013 Probably some way using DATESINPERIOD perhaps or something else like that. Generally though, once you start to stray outside the lines a bit T"I" functions become more of a hassle than a help.
You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |