Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Expression.Error: The name 'SWITCH' wasn't recognized. Make sure it's spelled correctly.

Hello All,

 

I am creating a custom column and I am not getting any syntax errors but when I click ok I am getting below error.

Could any one please help how to fix this

 

 

 

  • Hi,

    Switch is a DAX function not an M function?  Write it as a calculated column formula

    =if(and([Region="APAC",OR([AgentDepartment]="Hyd",[AgentDepartment]="Unknown")),"ASD Hyd",blank())

    Hope this helps.

5 Replies

  • Hi,

    Switch is a DAX function not an M function?  Write it as a calculated column formula

    =if(and([Region="APAC",OR([AgentDepartment]="Hyd",[AgentDepartment]="Unknown")),"ASD Hyd",blank())

    Hope this helps.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Icon for Super User rankSuper User

        Write a calculated column formula in DAX not a Custom formula in M