Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I have created a date picker and calculating yesterday and day and before yesterday for a particular data set but as a changes the date in the date picker it's not changing yesterday and day before yesterday value. Attached the DAX which I am writing for the day before yesterday and smiliar for yesterday. what should I do so that if we change the date in date picker the value of yesterday and day before yesterday also changes?
Thanks in Advance.
Solved! Go to Solution.
try this:
yesterday = CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )-1
day before yesterday = CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )-2
try this:
yesterday = CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )-1
day before yesterday = CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table'[Date] ) )-2
Create Measures as below:
It's giving 15 march as yesterday because 16 march is the last date in the dataset but I want that whatever date I select in the date picker suppose I select 13 march then yesterday and day before yesterday values changes to 12 march and 11 march
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
100 | |
72 | |
44 | |
38 | |
30 |
User | Count |
---|---|
156 | |
92 | |
62 | |
44 | |
41 |