Forum Discussion

mjackson122's avatar
mjackson122
Regular Visitor
5 years ago
Solved

Custom Column Query If, ands, or

Attempting to create a custom column in query however the results are always error. I have a column called office in table 1 that I want to create a custom column from. If[office]="A" and [size]="s...
  • amitchandak's avatar
    5 years ago

    mjackson122 , Try like 

     

    In power query

    If[office]="A" and ([size]="small" or [size]= "medium" or [size]= "large")
    then "normal"
    else "xlarge"

     

    or

     

    If[office]="A" and [size] in {"small", "medium","large"}
    then "normal"
    else "xlarge"

     

    in DAX

    If ([office]="A" && [size] in {"small", "medium","large"} ,"normal" ,"xlarge")