March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hello, I am struggling with the following calculation.
I have date slicer, where a user can select a variable time period.
For example user selects 3.May.2021 till 5.May.2021.
I want to compare figures with the same amount of days before.
So previous period will be 30.April.2021 till 2.May.2021.
How to create the calcuation for the period before? I have a DateRangeMin vs Max, but it works on total level only, not when I want to calculate it for each date in the time frame.
Here it needs to be -3 for each line, so I can calculate back to each previous period line with the function dateadd(date,-3,day).
So right now 3.May looks at 2.May, 4.May looks at 3.May, while it should be: 3.May look at 30.Apr, and 4.May looks at 1.May.
Hopefully my question is clear and somebody can point me in the right direction.
Solved! Go to Solution.
Thanks for your reply!
I managed to solve it otherwise. The datediff was achieved also by a countrows on my second datetable.
Thanks for your reply!
I managed to solve it otherwise. The datediff was achieved also by a countrows on my second datetable.
Try to add ALLSELECTED ('Calendar'[Date]) to your DateRangeMin and DateRangeMin measures.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
22 | |
19 | |
16 | |
9 | |
5 |
User | Count |
---|---|
37 | |
29 | |
16 | |
14 | |
12 |