I am creating an expression that can give count of all employees who had spent > 5 for lunch/Breakfast and > 10 for dinner . I would like to include only employees who are in city='NewYork'. I have my formula as below which works, but I also need to put a condition that will make the below calculation only for New York employees
=COUNT(DISTINCT( if(([SPEND] > 5 and Match(MEAL_TYPE,'Lunch','Breakfast'))
or ([SPEND] > 10 and Match(MEAL_TYPE,'Dinner'))
FYI. There are 2 tables A and B
A has below fields
B has below fields
I hope i need to use set analysis which i am trying to learn.Please help me resolve the above issue.