Creating Calculated Field with combination of in and not in

I am trying to create a calculated field using thi sformula


ifelse(
in({resource_tags_user_product},["ac-random","ac-random-extension","ac",""]) AND in({resource_tags_user_infra_owner},["DevOps_NA","devops_na@gmail.com","DevOps_NA@gmail.com","Devops_NA@gmail.com",""]) ,"Combination1",
"Unknown"
)

But here is a catch … i want to add a condition such that empty product should match with any value of infraowner and vicee versa .
But there should be a condition such that both empty should not be matched .
Can anyone please help here

Hello @Ashish2521, welcome to the Quick Sight Community!

In order to accomplish this, you would likely want to add more checks within your ifelse statement. It would look something like this:

ifelse(
in({resource_tags_user_product},["ac-random","ac-random-extension","ac",""]) AND in({resource_tags_user_infra_owner},["DevOps_NA","devops_na@gmail.com","DevOps_NA@gmail.com","Devops_NA@gmail.com"]) ,"Combination1",
in({resource_tags_user_product},["ac-random","ac-random-extension","ac"]) AND in({resource_tags_user_infra_owner},["DevOps_NA","devops_na@gmail.com","DevOps_NA@gmail.com","Devops_NA@gmail.com",""]) ,"Combination1",
"Unknown"
)

You could also add a third check if both contain empty strings, but it likely won’t be necessary with this change to the calculation. I will mark this response as the solution, but please let me know if you have any remaining questions. Thank you!