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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Group columns into a category

Good afternoon, in my table in power bi I have separated the columns of gender and age range, that is to say that in one column I have Women and in another Men, in another column for example, adults, babies, children etc, in the records is the amount of each attribute. I need to group for example the gender in something that says "gender" and be able to filter if I want male or female, and the same with age range, then I can analyze for example what is the predominant age range of women etc. camila_acuna_0-1724265262094.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1724292240992.png

Then in Power Query, select the columns except for scope and gender.

Click the Unpivot columns in the Transform pane:

vzhengdxumsft_1-1724292347046.png

The result is as follow:

vzhengdxumsft_2-1724292506620.png

 

Best Regards

Zhengdong Xu
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

1 REPLY 1
Anonymous
Not applicable

Hi @Syndicate_Admin 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1724292240992.png

Then in Power Query, select the columns except for scope and gender.

Click the Unpivot columns in the Transform pane:

vzhengdxumsft_1-1724292347046.png

The result is as follow:

vzhengdxumsft_2-1724292506620.png

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors