Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!