Forum Discussion
IF Function - 2 Conditions,
- 10 years ago
Yes, you're on the right track with related. Assuming your InactiveEmployees table doesn't have duplicates, you'll want to create a relationship between the EmployeeMaster and InactiveEmployees tables on the employee_no field.
From the Home tab, go to Manage Relationships. If it didn't autodetect it and create it for you already, click New, select EmployeeMaster in the top and InactiveEmployees in the bottom table drop-downs, select the employee_no field in both tables, and set the Cardinality to Many to One.
With the relationship in place, you can adjust your formula:
Status = IF('EmployeeMaster'[reason_code]=BLANK() && RELATED('InactiveEmployees'[inactive_date])=BLANK(),"Active","Inactive")
Yes, you're on the right track with related. Assuming your InactiveEmployees table doesn't have duplicates, you'll want to create a relationship between the EmployeeMaster and InactiveEmployees tables on the employee_no field.
From the Home tab, go to Manage Relationships. If it didn't autodetect it and create it for you already, click New, select EmployeeMaster in the top and InactiveEmployees in the bottom table drop-downs, select the employee_no field in both tables, and set the Cardinality to Many to One.
With the relationship in place, you can adjust your formula:
Status = IF('EmployeeMaster'[reason_code]=BLANK() && RELATED('InactiveEmployees'[inactive_date])=BLANK(),"Active","Inactive")- amysmith9 years agoHelper I
Hi!
We have added a video on how to use the if function with multiple conditions on
http://power-bi-training1.teachable.com/p/power-bi-free-tutorial-videos/
:smileyvery-happy: