Forum Discussion

ArpanJain's avatar
ArpanJain
Frequent Visitor
3 years ago
Solved

using dax how to write categorization using first letter of field name

how to write category A for letter A-M and category b for letter N-P and category c for Q-Z from state and province  column
  • amitchandak's avatar
    3 years ago

    ArpanJain , You need to create a new column

     

    New column=

    var _1 = left([State or province],1)

    Switch(True() ,

    _1 <= "M", "Category A",

    _1 <= "O", "Category B",

    "Category C"

    )