Creating sub categories in new column within calculated column


I have several different roles that come with unique user IDs in an Excel database that I’m using for my report in Power BI. The different roles in the database are sub-groups of a large/parent role, like Project Engineer contains the following sub-roles: Project Engineer - Sr, Project Engineer - Jr, Project Engineer - Intern, etc.

I need help in finding a DAX formula that could simplify the data in the dashboard by making all the sub-roles to appear as their respective large/parent role in a calculated column. Appreciate your help on this.


There’s a few things you can do here.

You could use simple IF statements or SWITCH statements (which I prefer) inside a calculated column. This is easy stuff.

Also this could also be addressed by using Power BI’s GUI grouping feature, so you don’t need to come up with a formula for this.

See below for more information on this.

I hope this helps