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
jcastr02
Post Prodigy
Post Prodigy

late submissions calculated column

I have three columns

 

Date Record was Created

Due Date for Record (Created+3 Days)

Actual Submission Date

 

I’d like to create a calculated column that reads if the record was submitted late or not (Yes/No)-  What is happening now is when the actual submission date is blank (because they are still within the 3 days, it is showing late)

 

Any help would be appreciated

 

Ex. Below

 

Date CreatedDue DateActual SubmissionSubmitted Late?
12/1/202112/4/202112/2/2021No
12/2/202112/5/202112/6/2021Yes
12/3/202112/6/202112/6/2021No
12/13/202112/16/2021 No
12/14/202112/17/2021 No
1 ACCEPTED SOLUTION
Anonymous
Not applicable

you can't modify that column to text, as is in date format.

 

but what i can do is this

submitted late = if([Actual Submission]=0,"pending",if([Actual submission]<=[Due Date]),"Not Late","late"))

 

so the blank date will show "pending" instead of "late" nor "not late"

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

create a calculated column
subitted late = if(or([Actual Submission]=0,[Actual submission]<=[Due Date]),"Not Late","late")

@Anonymous  Thanks so much that worked, one more ?    How could I get ones that are blank with acknowledge Submission date - if those are blank for the output to be "N/A"

Screenshot 2021-11-01 121050.png

Anonymous
Not applicable

you can't modify that column to text, as is in date format.

 

but what i can do is this

submitted late = if([Actual Submission]=0,"pending",if([Actual submission]<=[Due Date]),"Not Late","late"))

 

so the blank date will show "pending" instead of "late" nor "not late"

Samarth_18
Community Champion
Community Champion

HI @jcastr02 ,

You can create a column using below code:-

 

Submitted Late? = 
IF (
    Submission_data[Actual Submission] = BLANK ()
        && Submission_data[Due Date] >= TODAY (),
    "No",
    IF (
        Submission_data[Due Date] >= Submission_data[Actual Submission],
        "No",
        "Yes"
    )
)

 

Output:-

Samarth_18_1-1639496241589.png

 

 

Thanks

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18  Thank you....How could I get if the acknowledge submission date is blank to show "n/a"  

 

Screenshot 2021-11-01 121050.png

You can do it but you have to change your date column type to text then replace blank with NA in a query editor, but if you do this then you will lose the purpose of date column.
Usually in such scenario blank is replace with some default date like 01/01/1990.

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.