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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jimmyg706
Helper IV
Helper IV

Late Task DAX Flag

Hi Everone

 

I was wondering how best to approach this with an additional column measure

 

I have table with a list of tasks and each one has a status and a due date.

 

I was wondering whether to use a Switch Function or something else.

 

Below is a mock up.

 

jimmyg706_0-1706705991883.png

 

 

I really just want a flag if the due date has passed  + but it needs to ignore any task with a staus of complete so lines 3 & 4 would be flagged as late

 

Line 1 is complete - so its done - i.e we dont care

Line 3 is a future task- I said mark as NA ; it could 

 

Task StatusDue DateLate Flag - DAX (switch/if function)
Complete15/02/2024NA
In Progress01/01/2024Late
To Do15/02/2024NA
Backlog02/01/2024Late

 

Task StatusDue DateLate Flag - DAX (switch/if function)
Complete15/02/2024NA
In Progress01/01/2024Late
To Do15/02/2024NA
Backlog02/01/2024Late

 

I do have a field in my dataset which does the following based on that due date you see on Column 2

 

 

Days Till Due Date = DATEDIFF(today(), POAP[Due Date],DAY)

 

 

Advice appreaciated

 

Cheers

 

Jimmy

 

 

1 ACCEPTED SOLUTION

@jimmyg706 

is this what you want?

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
jimmyg706
Helper IV
Helper IV

@ryan_mayu 

 

Indeed my explanation was well , very poor.

 

Here is a visual of my table with some sensitve data removed 

 

jimmyg706_0-1706770885417.png

 

So each task has a due date and also a status.

 

If the due date (date that it must be marked as Complete) is late, I want to flag this.

 

Now I could use conditional formatting to make it RED?

Maybe I could add an additonal column with a switch function?

 

Now the key thing here is that if a task is complete - it cannot be late. So completed tasks will have a due date in the past; they must not be flagged as they are done.

 

 

So sample data

 

Task NumberTask DescriptionTask StatusDue Date
1DesignComplete15/12/2023
2BuildIn Progress01/01/2024
3TestTo Do10/01/2024
4DeployTo Do02/01/2024

 

Screenshot of above in XLS is in Fig 1

 

Notice Task 2 & 3 are RED as they are late i.e the due date has passed and the task is not complete.

Notice Task 1 is complete; Due date is in the past; we dont care as its complete.

Task 4 - Its in the future - Basically ignore unless its late.

 

Fig 1 - Sample XLS mock up

 

jimmyg706_2-1706771547888.png

 

 

So I dont mind adding a conditonal column to give a status like late task or it can be done via some other mean i.e conditional formatting?

 

So thats about it,  How would you do this:

 

If Task Due date has passed and task is not complete show red; else do nothing

 

Cheers 

 

Jimmy

 

 

 

@jimmyg706 

is this what you want?

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

could you pls provide more sample data and the expected output? can't totally get your points based on just four rows of simple data.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.