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.
Dear ,
I have below requirement,
Date | Value | Result |
9/11/2020 | 1 | 1 |
9/12/2020 | 0 | 0 |
9/13/2020 | 0 | 0 |
9/14/2020 | 1 | 1 |
9/15/2020 | 1 | 2 |
9/16/2020 | 0 | 0 |
I have written below DAX and it's giving current value when i am choosing all dates. However, when i am slicing only two dates (Example: 09/13, 09/15), still result is taking only previous day value.
DAX
Prev Day Values = SWITCH(
Please let me know how to make this DAX dynamic irrespective of date slicer.
Example If I choose 09/13 and 09/15, then DAX should take read 09/13 instead of 09/14 for 09/15 row.
You cannot use PREVIOUSDAY(), you need to use MAX() or LASTNONBLANK with the condition that they be smaller than the current value. It's the standard "previous row" pattern.
Do you want help with the DAX for that?
Yes please, i would appreciate it.
How to change my current DAX to handle my requirement with MAX()?
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |