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
cyncyn_98
Frequent Visitor

Subtracting Days using DAX Formula UTCNOW()

Hello everyone, 

 

Currently I'm working on a report that will refresh every Sunday. I have two tables that show two sets of data that report on different dates. Table 1 (Activity) reports on the Sunday where the data is refreshed, and Table 2 will report 7 days (one week) back from the refresh date. 

 

Below is the formula for the Activity Report date that will be refreshed every Sunday. 

 

Activity Thru Date = "Sunday, " & MONTH(UTCNOW()) & "/" & DAY(UTCNOW()) & "/" & YEAR(UTCNOW())
 
I have been trying to use the 'Date Add' function with no luck. 
cyncyn_98_0-1652375270718.png

 

Is there a way to subtract 7 days using the UTCNOW function for Table 2?
1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@cyncyn_98 

 

You can just add or minus Directly for days >>> 

UTCNOW = UTCNOW()+2
ribisht17_0-1652375849206.png

Today is 12 so it shows 14 there

 

Regards,

Ritesh

 

View solution in original post

3 REPLIES 3
ribisht17
Super User
Super User

@cyncyn_98 

 

You can just add or minus Directly for days >>> 

UTCNOW = UTCNOW()+2
ribisht17_0-1652375849206.png

Today is 12 so it shows 14 there

 

Regards,

Ritesh

 

Thanks! That worked perfectly!

Welcome 🙂

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.