Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Creating Summary Roles from Multiple Role Names

Hi there,

 

I have data where there are various distinctions of the same role category.

For example, Test Analyst: End to End, Test Analyst: Infrastructure, System Admin: DevOps, System Admin: Operati

ons, Training Manager, Operations Manager etc.

 

What would be the best way to create a column which aggregates these roles under the same category? For example, simply Test Analyst, System Admin and Managerial.

 

I know I could use multiple if statements or replace the values but this seems cumbersome and not like best practice. 

Please find sample data below.

 

NameDeptRole
Jane DoeHRTest Analyst End to End
John SmithResearchIT Manager
Frank FrostStrategyOperations Manager
Sam SunFinancesSystem Admin Operations
Jack JillEngineeringTest Analyst Infrastructure
Dennis MenaceFinancesFinance Manager
Albert EinsteinStrategySystem Admin DevOps

 

Thanks!

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

If roles are large in number, then it is better to maintain a mapping table. Then you can do a lookup on the mapping table.

I am not sure how many roles are there but on the basis of limited data whatever you have provided, following formula would work in a custom column

= if Text.Contains([Role],"Manager") then "Managerial" else Text.BeforeDelimiter([Role]," ",1)

1.png

View solution in original post

3 REPLIES 3
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

If roles are large in number, then it is better to maintain a mapping table. Then you can do a lookup on the mapping table.

I am not sure how many roles are there but on the basis of limited data whatever you have provided, following formula would work in a custom column

= if Text.Contains([Role],"Manager") then "Managerial" else Text.BeforeDelimiter([Role]," ",1)

1.png

Anonymous
Not applicable

Thank you for this! I will try it out. Just for future reference, do you know of any useful references on the process of creating mapping tables?

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Mapping table means this

1.png

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.