Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table and I want to filter out the records which are due in 90 days, I used the following DAX query but now() and today() function is not working, I have tried both
** How can I add a new column with values (overdue, due) on the basis of date.
Document Type | Latest Date |
Certificate 1 | 3/1/2022 |
Certificate 2 | 1/31/2024 |
Layout Design | 7/1/2022 |
Statement 1 | 7/1/2022 |
Statement 2 | 3/1/2022 |
Processes Description | 10/1/2024 |
Flow Diagram | 10/1/2024 |
Floor Plan | 7/1/2022 |
Schedule 1 | 1/31/2024 |
Schedule 2 | 7/1/2022 |
List 1 | 7/1/2022 |
List 2 | 7/1/2022 |
Schedule A | 3/1/2022 |
Schedule Y | 3/1/2022 |
Schedule G | 3/1/2022 |
Solved! Go to Solution.
Hi @Irbaz ,
Try codes as below to create calculated columns.
Overdue =
VAR _DATEDIFF =
DATEDIFF ( TODAY (), 'Table'[Latest Date], DAY )
RETURN
IF ( _DATEDIFF < 0, TRUE (), FALSE () )
Due in 90 days =
VAR _DATEDIFF =
DATEDIFF ( TODAY (), 'Table'[Latest Date], DAY )
RETURN
IF ( _DATEDIFF >= 0 && _DATEDIFF <= 90, TRUE (), FALSE () )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@amitchandak Thank you for your reply,
How can I create 2 columns ("overdue" and "due in 90 days") with values TRUE and FALSE,
Hi @Irbaz ,
Try codes as below to create calculated columns.
Overdue =
VAR _DATEDIFF =
DATEDIFF ( TODAY (), 'Table'[Latest Date], DAY )
RETURN
IF ( _DATEDIFF < 0, TRUE (), FALSE () )
Due in 90 days =
VAR _DATEDIFF =
DATEDIFF ( TODAY (), 'Table'[Latest Date], DAY )
RETURN
IF ( _DATEDIFF >= 0 && _DATEDIFF <= 90, TRUE (), FALSE () )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Irbaz , try like
Table 2 = Filter(
'Table','Table'[Latest Date] >=Today() -90 && 'Table'[Latest Date] <=today())
Now has time also, today is only date
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |