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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Darko_Giac
Helper II
Helper II

Conditional Categorization in Power Query

 

Hi All,

I'm currently working with a fairly large data set in which I am looking to categorize respondents into certain classes based on their responses.

I have 6 categories that I would like to place respondents in:

1). ADComb

2). ADIna

3). An

4). Dep

5). SA

6). Other

A respondent can choose either any one or combination of the above. If they choose either ADComb or ADIna and any other option (so respondent 1 chose ADComb, An and Dep, they would fall into ADComb. In other words, ADComb and ADInatrump the other response options, and they would only be counted once to whichever of those two they chose).

However, if a respondent chooses a combination of An, Dep, SA and Other (so respondent 2 chooses An, Dep and SA, the count would be in all three for that one individual - if they only chose SA and Dep, they would be counted twice - once to each category)

If "Other" is chosen along with any of the three (An, Dep, SA - they are only counted in each one except for "Other")

If respondent 3 chooses "ADIna, An, Dep and SA, they would only get counted to ADIna, and not the other categories).

I've attached a workbook to hopefully clear up any confusion, as I know there are layered conditions built into the logic.

I would be looking to accomplish this in either Power Query or Power Pivot

Any help is greatly appreciated!

 

TestWorkbook

 

Darko

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Darko_Giac,

 

Just try to add custom column.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Darko_Giac,

 

Just try to add custom column.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-chuncz-msft, worked like a charm!

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.