Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 |
Solved! Go to Solution.
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
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
Brilliant, Thank you so much @Shishir22 ...
I have been trying so many ways but failed but you rescued me.
Highly appreciated 🙂
Thank you
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.
result
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.
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.
@amitchandak - I would like to create a column to separate the dates which are in next two weeks. please can you help ?
Many thanks
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.