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 all,
Once again I find myself stuck with DAX. The below is something I might otherwise fix with a for loop, but with DAX I am just not sure how to fix it.
What I would like to do is calculate last years sales, pretty simple you would say. However, in our company we work with comparison dates. So the 20th of april 2020 might be compared to the 19th of April of 2019. So simply using sameperiodlastyear will not work.
To complicate matters further, in my reports i use a period selector, which allows users to select a period (i.e. last month, current month, current year, yesterday etc) and these periods correspond to a number of dates.
A very simplified version of the current data model is this, where the dark lines are active relationships and the light line is an inactive one.
So I'd like to select a period from the PeriodSelector and get the sales figure from the corresponding previous year dates (determined by the dimDateComp).
I hope this makes sense and many thanks in advance for your help.
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |