Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |