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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Identify a date from a date column that are within next two weeks

Hi all,

 

I have a column with dates in the following format:

dd/mm/yyyy (sample data below)

 

How can I create a calculated column that only captures any date in the next two weeks. 

 

Thank you in advance.

 

Date column
16/12/2021
17/12/2021
18/12/2021
21/12/2021
22/12/2021
13/01/2022
14/01/2022
15/01/2022
26/01/2022
23/02/2022
24/02/2022
25/02/2022
01/03/2022
18/03/2022
22/03/2022
24/03/2022
25/03/2022
26/03/2022
28/03/2022
29/03/2022
30/03/2022
31/03/2022
01/04/2022
02/04/2022
04/04/2022
05/04/2022
06/04/2022
07/04/2022
08/04/2022
09/04/2022
16/04/2022
24/04/2022
25/02/2023
18/05/2023

05/12/2023

1 ACCEPTED SOLUTION
Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Try Creating Calculated Column as 

Column = If(Table[Date]>=TODAY() && Table[Date]<=TODAY()+14,Table[Date],blank())

 

Please mark it as solution if it solves your issue. Kudos are also appreciated.

 

Cheers!

Shishir

Cheers,
Shishir

View solution in original post

7 REPLIES 7
Shishir22
Solution Sage
Solution Sage

Hello @Anonymous ,

 

Try Creating Calculated Column as 

Column = If(Table[Date]>=TODAY() && Table[Date]<=TODAY()+14,Table[Date],blank())

 

Please mark it as solution if it solves your issue. Kudos are also appreciated.

 

Cheers!

Shishir

Cheers,
Shishir
Anonymous
Not applicable

Brilliant, Thank you so much @Shishir22 ...

 

I have been trying so many ways but failed but you rescued me. 

 

Highly appreciated 🙂

 

Thank you 

v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us. 

Calculated column cannot be changed dynamically. So in this scenario, you can go to Power Query Editor, and try below, then date column will be filtered according to the current date.

vxiaotang_0-1649313159798.pngvxiaotang_1-1649313168171.png

result

vxiaotang_2-1649313308227.png

 

Best Regards,

Community Support Team _Tang

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

Anonymous
Not applicable

Hi, 

 

Thank you for reaching out.

 

I wanted to use it as a conditional formatting to highlight any dates fall into next two weeks to warn me. 

 

what would be the best solution then ?

 

Any help would be much appreciated.

Anonymous
Not applicable

@amitchandak  Please can you help me ? 

 

amitchandak
Super User
Super User

@Anonymous , try a measure like

 

countrows(filter(Table, Table[Date] >= today() && Table[Date] <=today() +14))

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
Anonymous
Not applicable

@amitchandak  - I would like to create a column to separate the dates which are in next two weeks. please can you help ?

 

Many thanks

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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