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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pricey79
Helper V
Helper V

Help with IF statement please - Much Appreciated

Hello, I was hoping someone could help please.

I have the following :

Pricey79_0-1677839273994.png

I need a new column in column E that shows me the owner of the ID based on condtions. 

If the state is "Waiting" and the Date column is empty then show the OWNER (in this case Dave) but IF the date is not blank and the state is "Waiting" then show the other Owner (in this case Bob)

This would then show me who I am waiting for to complete an action

The ID will always be the same. 

Could anyone hlep with this please?

 

Thank you for any help. 

1 ACCEPTED SOLUTION

Yes, you can modify the formula to prioritize the owner with the "Waiting" state, even if both dates are empty. You can use the OR function to check if either the state or date is empty and then adjust the logic accordingly. Here's the modified formula:

=IF(AND(OR(ISBLANK(Table1[State]),Table1[State]<>"Waiting"),ISBLANK(Table1[Date])),"",IF(Table1[State]="Waiting","Bob","Dave"))

This formula checks if either the state or date is empty or if the state is not "Waiting" and the date is empty, in which case it returns an empty string. Otherwise, it returns "Bob" if the state is "Waiting" or "Dave" otherwise.

View solution in original post

5 REPLIES 5
MAwwad
Solution Sage
Solution Sage

Owner = IF(AND(Table1[State] = "Waiting", ISBLANK(Table1[Date])), "Dave", IF(Table1[State] = "Waiting", "Bob", ""))

Note that you will need to replace "Table1" with the actual name of your table, and "State" and "Date" with the actual names of the columns that contain the state and date data, respectively.

@MAwwad thank you for your reply. This works in the coloumn but shows both owners when both dates are empty. Is there a way to show the one with the state as Waiting, if they are both empty please?

Thank you

Yes, you can modify the formula to prioritize the owner with the "Waiting" state, even if both dates are empty. You can use the OR function to check if either the state or date is empty and then adjust the logic accordingly. Here's the modified formula:

=IF(AND(OR(ISBLANK(Table1[State]),Table1[State]<>"Waiting"),ISBLANK(Table1[Date])),"",IF(Table1[State]="Waiting","Bob","Dave"))

This formula checks if either the state or date is empty or if the state is not "Waiting" and the date is empty, in which case it returns an empty string. Otherwise, it returns "Bob" if the state is "Waiting" or "Dave" otherwise.

@MAwwad thank you so much!

You are welcome 🙂

 

Dont forget to accept it as a solution in order to help others

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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