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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jonnyA
Responsive Resident
Responsive Resident

Formula for Days back minus 2 days from current date

Hey!

I'm hoping someone can help me come up with a formula for "Days back minus 2 (From current date)".  Not sure if you will need the current "Fields" i was given in the dataset, but here they are ... 

jonnyA_0-1620592515748.png

Thank you in advance! 🙂

2 ACCEPTED SOLUTIONS
selimovd
Super User
Super User

Hey @jonnyA ,

 

depends on what exactly you are doing.

You can just use your date and do a minus 2, for example as a calculated column:

Day before yesterday = myTable[Date] - 2

 

To calculate the date proper I would use the DATEADD function:

DATEADD ( DateTable[Date] , -2, DAY )  

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

jonnyA
Responsive Resident
Responsive Resident

Today - 2 = TODAY() - 2
 
The measure above on this text ended up working for me!  But the one you gave me helped me get going ion figuring it out, so thank you!

View solution in original post

3 REPLIES 3
jonnyA
Responsive Resident
Responsive Resident

Today - 2 = TODAY() - 2
 
The measure above on this text ended up working for me!  But the one you gave me helped me get going ion figuring it out, so thank you!

Hey @jonnyA ,

 

that's great news! I'm happy you could solve it.

Can you mark my post as solution if it helped you to find the right formula? This makes it easier for the next person to find the right path for a similar problem.

 

If you need any help please let me know.
 
Best regards
Denis
 
selimovd
Super User
Super User

Hey @jonnyA ,

 

depends on what exactly you are doing.

You can just use your date and do a minus 2, for example as a calculated column:

Day before yesterday = myTable[Date] - 2

 

To calculate the date proper I would use the DATEADD function:

DATEADD ( DateTable[Date] , -2, DAY )  

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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