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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
hathakas
New Member

Need help with getting yesterday's date. Yesterday's date breaks on the first of each month.

Hey guys!

First post, hope I'm posting this in the correct location.

 

Today = CALENDAR (DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())),DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())))
Yesterday = CALENDAR (DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())-1),DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())-1))
Last 3 Days = CALENDAR (DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())-4),DATE(YEAR((TODAY())),MONTH((TODAY())),DAY(TODAY())-1))

 

This is what I'm using which seems to work fine, except it seems to get weird when it's around the 1st. 

I've tried so many different ways to get this working and this method was the only thing I managed to get working.

Thanks!

1 ACCEPTED SOLUTION
jaideepnema
Solution Sage
Solution Sage

Hi @hathakas ,

You can use the following :

Last 3 Days = CALENDAR(TODAY()-2,TODAY())
Today = CALENDAR(TODAY(),TODAY())
Yesterday = CALENDAR(TODAY()-1,TODAY())

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

View solution in original post

2 REPLIES 2
jaideepnema
Solution Sage
Solution Sage

Hi @hathakas ,

You can use the following :

Last 3 Days = CALENDAR(TODAY()-2,TODAY())
Today = CALENDAR(TODAY(),TODAY())
Yesterday = CALENDAR(TODAY()-1,TODAY())

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

Thank you!! Exactly what I've been looking for.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.