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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.