Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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.

 

 

 

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

 

 

3 Replies

  • 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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    ryan_mayu 

     

    Indeed my explanation was well , very poor.

     

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

     

     

    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

     

     

     

    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