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
Anonymous
Not applicable

If(And(is blank statement

I am trying to create a nested if statement with multiple variables. However i can't seem to get the pieces below to connect correctly and the second argument only gives me false instead of the results i am looking for. The first piece works just fine on its own. However, I just need to know how to connect it to the second piece and get the logic to work together. 

 

 

I want the second piece to work as such: if the actual ship date is blank and less than the scheduled pickup from date then "Missed" else its "pending" I need that tied into the first piece to create 4 possible choices based on the dates. Any help would be greatly appreciated. 

 

 

 

Pickup_Status = if('Load Fact'[actual_ship_dt].[Date] <= 'Load Fact'[scheduled_pick_up_from_dt].[Date],"Complete","Late")
 
 
&& IF(AND(ISBLANK('Load Fact'[actual_ship_dt].[Date] > 'Load Fact'[scheduled_pick_up_from_dt].[Date]),"Missed"),"Pending")
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You need to rework on the conditions you can not have two else.

 

Example , how can you do it

 

Switch( True() ,
ISBLANK('Load Fact'[actual_ship_dt].[Date]) ,"Missed" ,
'Load Fact'[actual_ship_dt].[Date] > 'Load Fact'[scheduled_pick_up_from_dt].[Date] , "Pending",
'Load Fact'[actual_ship_dt].[Date] <= 'Load Fact'[scheduled_pick_up_from_dt].[Date],"Complete",
"Late"
)

 

 

refer for switch : https://www.youtube.com/watch?v=gelJWktlR80

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You need to rework on the conditions you can not have two else.

 

Example , how can you do it

 

Switch( True() ,
ISBLANK('Load Fact'[actual_ship_dt].[Date]) ,"Missed" ,
'Load Fact'[actual_ship_dt].[Date] > 'Load Fact'[scheduled_pick_up_from_dt].[Date] , "Pending",
'Load Fact'[actual_ship_dt].[Date] <= 'Load Fact'[scheduled_pick_up_from_dt].[Date],"Complete",
"Late"
)

 

 

refer for switch : https://www.youtube.com/watch?v=gelJWktlR80

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.