Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sw123
Helper III
Helper III

Showing sales upto yesterdays date

Hi,

 

I have a slicer that shows sales upto todays date in earlier month (eg. today it shows what we have sold each month upto the 18th):

Current day = if(DateTable[Monthday] <= DAY(TODAY()); TRUE(); FALSE())
 
I would now like to change it to show sales upto yesterdays date. I have tried:
Yesterdays date = if(DateTable[Monthday] <= DAY(TODAY()-1); TRUE(); FALSE())
but it did not work.
 
Any ideas?
1 ACCEPTED SOLUTION

Hi @sw123

 

If Monthday=DAY(DateTable[Date]) is a measure,it should be modified as below:

 

 

Monthday=DAY(SELECTEDVALUE(DateTable[Date]))

 

If it doesnt work, pls show me your .pbix file.You can upload it to onedrive then share the link with us.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, the easiest way, when your first formula works as expected, would be to replace the <= with <

 

Yesterdays date = if(DateTable[Monthday] < DAY(TODAY()); TRUE(); FALSE())

 

Thanx, but it still doesn't work. Does it have something to do with the Monthday, that is a measure in my date table:

Monthday = DAY(DateTable[Date])
 
I'm not to good with DAX...

Hi @sw123

 

If Monthday=DAY(DateTable[Date]) is a measure,it should be modified as below:

 

 

Monthday=DAY(SELECTEDVALUE(DateTable[Date]))

 

If it doesnt work, pls show me your .pbix file.You can upload it to onedrive then share the link with us.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors