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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ZachUnger
Helper I
Helper I

Overdue based on multiple Columns

Hi Team 

I'm trying to create a calculated column based on the below logic and wondering if anyone can help? 

The new Column will be the overdue in yellow. 

ZachUnger_0-1725841593001.png

 

Any help is appreciated. 

Cheers 

Zach

1 ACCEPTED SOLUTION

hello @ZachUnger 

 

as far as i know, SWITCH() works similarly like IF(), so it will process the first line then second line and so on.

 

that happens because you have date info sent value less than today (initially this what i thought but looks like you want to have "No" if there is value in date info sent not matter what the value is).

 

Try removing this line or line 5 in your DAX, it should fix the issue.

Overdue =
SWITCH(
    TRUE(),
    'Table'[Date info sent]<>BLANK()&&'Table'[Date info sent]>TODAY(),"No",
    'Table'[Required by]>TODAY(),"No",
    'Table'[Extended to]<TODAY(),"Yes",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]>TODAY(),"No",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]<TODAY(),"Yes"
)


Hope this will help.

Thank you.

View solution in original post

7 REPLIES 7
ZachUnger
Helper I
Helper I

Thanks, Shravan133 this calculation is just showing past for everything... 

ZachUnger_0-1725844494061.png

 

hello @ZachUnger 

 

does SWITCH plausible to be used for your goal?

Overdue =
SWITCH(
    TRUE(),
    'Table'[Date info sent]<>BLANK()&&'Table'[Date info sent]>TODAY(),"No",
    'Table'[Required by]>TODAY(),"No",
    'Table'[Extended to]<TODAY(),"Yes",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]>TODAY(),"No",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]<TODAY(),"Yes"
)

Irwan_0-1725845886035.png

 

Hope this will help.

Thank you.

Hi Irwan 

This is working except for if date info sent, if this column has a date shouldn't show as overdue. May be asking it to do too much...

ZachUnger_0-1725849304320.png

 

hello @ZachUnger 

 

as far as i know, SWITCH() works similarly like IF(), so it will process the first line then second line and so on.

 

that happens because you have date info sent value less than today (initially this what i thought but looks like you want to have "No" if there is value in date info sent not matter what the value is).

 

Try removing this line or line 5 in your DAX, it should fix the issue.

Overdue =
SWITCH(
    TRUE(),
    'Table'[Date info sent]<>BLANK()&&'Table'[Date info sent]>TODAY(),"No",
    'Table'[Required by]>TODAY(),"No",
    'Table'[Extended to]<TODAY(),"Yes",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]>TODAY(),"No",
    'Table'[Required by]<TODAY()&&'Table'[Extended to]<TODAY(),"Yes"
)


Hope this will help.

Thank you.

Perfecto! Thanking you kindly! 

hello @ZachUnger 

 

glad to be a help.

 

Thank you.

Shravan133
Solution Sage
Solution Sage

you can create a conditional column or measure like this:

DateStatusMeasure =
IF(
ISBLANK(MAX(TableName[DateField])),
"No Date",
IF(
MAX(TableName[DateField]) < TODAY(),
"Past",
"Future"
)
)

modify it according to your needs

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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