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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MasterT
New Member

If Status column is open after the future date, result as overdue in a new column

Greetings, 

 

Hope everyone is well, i am trying to achieve something with below two columns, I am trying to write a new dax expression in a new column that will note overdue items. like if Status is open after PAIA due date, result should be overdue. Can anyone help if possible?

MasterT_2-1635341850474.png

 

MasterT_1-1635341747710.png

 

 

1 ACCEPTED SOLUTION
YukiK
Impactful Individual
Impactful Individual

How about this one:

 

VAR __DaysOverDue = 'Privacy & Protecion Register'[PAIA_Due_Date] - TODAY()

Overdue = IF( AND( __DaysOverDue > 0, 'Privacy & Protecion Register'[Status] = "Open"), __DaysOverDue & " overdue", "Not overdue" )

 

Let me know if this helps!

View solution in original post

5 REPLIES 5
MasterT
New Member

Please check this one, i think it might work, but i would like it to highlight that it will be overdue 5 days before the actual date

Overdue = IF( AND( 'Privacy & Protecion Register'[PAIA_Due_Date]> TODAY(), 'Privacy & Protecion Register'[Status] = "Open"), "Overdue", "Not overdue" )
YukiK
Impactful Individual
Impactful Individual

How about this one:

 

VAR __DaysOverDue = 'Privacy & Protecion Register'[PAIA_Due_Date] - TODAY()

Overdue = IF( AND( __DaysOverDue > 0, 'Privacy & Protecion Register'[Status] = "Open"), __DaysOverDue & " overdue", "Not overdue" )

 

Let me know if this helps!

Hi Yukik, Thanks a million. It worked. I am not certain how can i test if it will be overdue 5 days before the actual date.

YukiK
Impactful Individual
Impactful Individual

Could you elaborate your situation a little more in detail? Do you have another date column you're comparing to the due date, right?

 

You can create a calculated column:

 

Overdue = IF( AND(yourdate > duedate, status = "Open"), "Overdue", "Not overdue" )

 

Try this and let me know if it works!

Hi Yukik, 

 

No i don't have any other date i am comparing with, to you give you context. Due date calculate automatically from source 30 days after the date initiated is selected. what i am trying to achieve in my report to compare status and due date that is derived from date initiated, selected by the user.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.