cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

adding dates

Hello,

 

salman_ali_0-1603465806162.png

if date is 7 days ago, I would like to add 7 days to today's date

if date is 6 days ago, I would like to add 6 days to today's date

so on and so forth

if date is today, then leave it as is 

otherwise blank 

 

but my formula doesn't work, 

it gives me blanks or today's date 

 

reasons?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Hi @salman_ali ,

 

Refer to this:

next_date = var diff = DATEDIFF('Table'[date],TODAY(),DAY)
return IF(diff>=0&&diff<=7,TODAY()+diff,BLANK())

V-lianl-msft_0-1603768267612.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

@salman_ali , Seem like a new column like

Switch( True() ,
Query[Event Date] >= today() -7 && Query[Event Date] <=today() , today(),
blank()
)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Microsoft
Microsoft

Hi @salman_ali ,

 

Refer to this:

next_date = var diff = DATEDIFF('Table'[date],TODAY(),DAY)
return IF(diff>=0&&diff<=7,TODAY()+diff,BLANK())

V-lianl-msft_0-1603768267612.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors