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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
salman_ali
Helper IV
Helper IV

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
V-lianl-msft
Community Support
Community Support

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
V-lianl-msft
Community Support
Community Support

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.

amitchandak
Super User
Super User

@salman_ali , Seem like a new column like

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors