Forum Discussion
rvnaresh
Microsoft Employee
3 years agoTry to use OR function with if and text contains
Hi, I want to categorize the datacenter to a region like the table below and use it in one of my reports. Datacenter Location ABC01 Europe ABC02 Europe ACB01 Europe ACB02 Eur...
rvnaresh
Microsoft Employee
3 years agoThank you for the solutions.
Will I be not able to call the function with multiple values in at a time? I have over 50 datacenters that needs categorization and the code looks cumbersome
It will be easy if I provide the the values in a single function rather than taking up multiple lines.
such as:
if Text.Contains([Data Center], OR("AB*, AC*") then "Europe"
or
if Text.StartsWith([Data Center],OR("AB*", "AC*") then "Europe"
or
if StartString = or("AB*", "AC*) then "Europe"
DavidBI
3 years agoRegular Visitor
Hello,
Wouldn't it make sense to have a separate lookup table in which you start all the datacenters and join this to the main table? This increases flexibility as i think an if clause is not best stuiable if you have over 50 cases.