Forum Discussion
DAX IF statement help - multiple if's?
I have a basic task that will take our budget status, scope status and schedule status and return an "overall status" based on the color of each of the 3 statuses mentioned above
The 3 statuses can either be Green, yellow, or red
If all 3 statuses are green, then overall status = Green
If 1 status is yellow, then overall status = Yellow
If 1 status is red, then overall status = Red
^^ I can't quite figure out how to create this using dax, any help will be greatly appreciated!
- Anonymous8 years ago
acalderon,
Please create a column using DAX below and check if it returns your expected result. Besides, what result would you like to get if a task contains both yellow and red status?overall status = IF(AND(AND(Table1[budget status]="Green",Table1[scope status]="Green"),Table1[schedule status]="Green"),"Green",IF(OR(OR(Table1[budget status]="yellow",Table1[scope status]="yellow"),Table1[schedule status]="yellow"),"Yellow",IF(OR(OR(Table1[budget status]="red",Table1[scope status]="red"),Table1[schedule status]="red"),"Red")))
Regards,
Lydia
1 Reply
- AnonymousNot applicable
acalderon,
Please create a column using DAX below and check if it returns your expected result. Besides, what result would you like to get if a task contains both yellow and red status?overall status = IF(AND(AND(Table1[budget status]="Green",Table1[scope status]="Green"),Table1[schedule status]="Green"),"Green",IF(OR(OR(Table1[budget status]="yellow",Table1[scope status]="yellow"),Table1[schedule status]="yellow"),"Yellow",IF(OR(OR(Table1[budget status]="red",Table1[scope status]="red"),Table1[schedule status]="red"),"Red")))
Regards,
Lydia