Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
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 | STI |
| ABIN-OTT | OLX |
| BCID-OTT | OIA |
| CFTU-OTT | OIA |
Now i want a Dax column or conditional column such that
if(table(colum2) = OLX || TRS and if(table(colum2) = OIA||BHT and if(table(colum1) = Start with "EMEN" then it should show "State coverd" and if(table(colum2)= STA||STI then "Current State" and rest all "not covered"
Solved! Go to Solution.
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.
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.
I doubt on few and condition, but you can get like
if(table(colum2) in {"OLX", "TRS"} && table(colum2) = in {"OIA", "BHT"} && search("EMEN",table(colum1),1) >0 , "State coverd"
, if(table(colum2) in {"STA","STI"} , "Current State" , "not covered"))
if(table(colum2) in {"OLX", "TRS","OIA", "BHT"} && search("EMEN",table(colum1),1) >0 , "State coverd"
, if(table(colum2) in {"STA","STI"} , "Current State" , "not covered"))
Or use use Switch True
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
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")
when colum1 of "OIA" and "BHT " along with column2 of starts with "EMEN" then also it should be "State Covered"
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!