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
bix
Frequent Visitor

Calculate Task Completion and Display the message "Completed".

S1.JPG

 

 

 

 

 

 

 

Above screen shot. Created new column with ..... 

Days Left or OverDue = 'XXX'[Actual Due Date]-TODAY() .....

to calculate the days left or overdue.

But some tasks already completed. Instead of showing days (-100) or (-9) for completed tasks, I want to show up for the completed tasks (Completed), as of completion % showing 100%. 

Also, I want to show up for over due, if tasks not completed within time duration, show up (9 Days Overdue).

 

 

 

2 ACCEPTED SOLUTIONS

Hi @bix,

 

Since the [Completion %] doesn't have a total value, please try the formula below.

Days Left or OverDue =
VAR days =
    DATEDIFF ( MIN ( [Actual Due Date] ), TODAY (), DAY )
RETURN
    IF (
        ISBLANK ( [Completion %] ),
        BLANK (),
        IF (
            [Completion %] = 1,
            "Completed",
            IF ( days > 0, days & " Days Overdue", - days & " Left" )
        )
    )

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi, Isn't your total just standard PBI's total? you can turn it off here:

Capture.PNG

View solution in original post

5 REPLIES 5
v-jiascu-msft
Employee
Employee

Hi @bix,

 

Try this formula please. I assume the [Completion %] is a measure.

Days Left or OverDue =
VAR days =
    DATEDIFF ( MIN ( [Actual Due Date] ), TODAY (), DAY )
RETURN
    IF (
        [Completion %] = 1,
        "Completed",
        IF ( days > 0, days & " Days Overdue", -days & " Left" )
    )

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, Almost Done. 

1. But not able to remove the last line of total, as showing 101 days overdue. 

2. if completion % is blank, how i can keep "Blank", as it is showing in first row (Left).

 

 

s2.JPG

Hi @bix,

 

Since the [Completion %] doesn't have a total value, please try the formula below.

Days Left or OverDue =
VAR days =
    DATEDIFF ( MIN ( [Actual Due Date] ), TODAY (), DAY )
RETURN
    IF (
        ISBLANK ( [Completion %] ),
        BLANK (),
        IF (
            [Completion %] = 1,
            "Completed",
            IF ( days > 0, days & " Days Overdue", - days & " Left" )
        )
    )

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Dale,

 

Thank you so much, solution is working fine. Except the total, I tried to hide the total number of days as showing 101-Days Overdue. Do you have any solution to hide the last Row of Total. 

 

Regards,

Bix.

Hi, Isn't your total just standard PBI's total? you can turn it off here:

Capture.PNG

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.