Forum Discussion

ovetteabejuela's avatar
ovetteabejuela
Impactful Individual
9 years ago
Solved

Power Query: Select...Case...End Select

Sorry, I'm more of a VBA guy....   Looking for something similar in PowerQuery.   I'd like to categorize by Tenure... 1 to 30 31 to 60 60 to 90 90 and above   some sort...   Thank you.
  • dkay84_PowerBI's avatar
    9 years ago

    In Power Query, add a custom column with the syntax:

     

    if [Tenure] <= 30 then "1 to 30" else if [Tenure] >30 and [Tenure] <= 60 then "31 to 60" ...

     

    You can also bucket items from the desktop UI or with DAX, rather than use Power Query.