Forum Discussion
chotu27
Post Patron
6 years agoMuliple if Condition with multiple conditions
Hi All, Ignatkovkir Below is the sample data Column 1 Column2 EMEN -OTT OLX EIN -OTT OLX EMEN -OTT OIA ANIN -OTT TRS EMEN -OTT BHT EMEN -OTT STA EMEN -OTT ...
- 6 years ago
Hi, chotu27
Based on your description, you may try the following formulas.
formula1 = IF( OR('Table'[Column2]="OLX",'Table'[Column2]="TRS")&& LEFT('Table'[Column1],4)="EMEN", "State Covered", IF( OR('Table'[Column2]="OIA",'Table'[Column2]="BHT")&& LEFT('Table'[Column1],4)="EMEN", "State Covered", IF( OR('Table'[Column2]="STA",'Table'[Column2]="STI"), "Current State", "not covered" ) ) )formula2 = SWITCH( TRUE(), OR('Table'[Column2]="OLX",'Table'[Column2]="TRS")&&LEFT('Table'[Column1],4)="EMEN","State Covered", OR('Table'[Column2]="OIA",'Table'[Column2]="BHT")&&LEFT('Table'[Column1],4)="EMEN","State Covered", OR('Table'[Column2]="STA",'Table'[Column2]="STI"),"Current State", "not covered" )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
You might need to make some adjustments, but a column with a switch statement should do the job.
ColumnName = switch(
true();
if(or(table[column2]="OLX";table[column2]="TRS");"State Covered";blank());
if(or(table[column2]="OIA";table[column2]="BHT");"State Covered";blank());
if(left(table[column1];4)="OMEN";"State Covered";blank());
if(or(table[column2]="STA";table[column2]="STI";"Current State";blank());
"Not covered")
- chotu276 years ago
Post Patron
when colum1 of "OIA" and "BHT " along with column2 of starts with "EMEN" then also it should be "State Covered"