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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Janica123
Helper I
Helper I

Grouping categorical values in pie chart not possible

Hi everyone, 
I have many categorical values that I'd like to group and visualize in a pie chart. My data is comming from a warehouse in fabric

I connected Power BI Desktop with my semantik model via OneLake-Datahub and want to create the report in Power BI Desktop. 

When I do a right click on the column where the values are that I'd like to group I don't have the option to group it....

Janica123_0-1732198341181.png

 

Does someone know where I can create new groups?

 

Many thanks in advance!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Janica123 ,

 

One point worth noting is: remember to select connect to SQLendpoint when connecting to warehouse data in power bi desktop, and then select import or DQ mode to connect, connecting directly may cause problems.

vhuijieymsft_0-1732779263367.png
vhuijieymsft_1-1732779263368.png

 

To group multiple categorical values ​​and visualize them as a pie chart in Power BI, I have two methods:

 

In the first method, in Power BI Desktop, you can use the IF function to create a calculated column that is grouped based on categorical value conditions.

 

Then use the calculated column you created as the legend of the pie chart.

 

Finally, use your value field (for example, quantity or percentage) as the value of the pie chart.

 

In this way, you can see the grouped categorical values ​​in the pie chart.

 

There is an example in the link attached below:

Solved: Dynamic Pie chart by grouping smaller groups under... - Microsoft Fabric Community

 

The second method is to add a custom column in Power Query.

 

Take my sample data for example. If the category column starts with Mountain, the custom column named Type created will be = Mountain. If it starts with Road, Type will be = Road.

 

This is my code:

 

= if Text.StartsWith([category], "Mountain") then "Mountain"
else if Text.StartsWith([category], "Road") then "Road"
else null

 

vhuijieymsft_0-1732243047361.png

 

This is the result after running:

vhuijieymsft_1-1732243047375.png

 

Then repeat the steps of the first method.

vhuijieymsft_2-1732243101985.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Janica123 ,

 

One point worth noting is: remember to select connect to SQLendpoint when connecting to warehouse data in power bi desktop, and then select import or DQ mode to connect, connecting directly may cause problems.

vhuijieymsft_0-1732779263367.png
vhuijieymsft_1-1732779263368.png

 

To group multiple categorical values ​​and visualize them as a pie chart in Power BI, I have two methods:

 

In the first method, in Power BI Desktop, you can use the IF function to create a calculated column that is grouped based on categorical value conditions.

 

Then use the calculated column you created as the legend of the pie chart.

 

Finally, use your value field (for example, quantity or percentage) as the value of the pie chart.

 

In this way, you can see the grouped categorical values ​​in the pie chart.

 

There is an example in the link attached below:

Solved: Dynamic Pie chart by grouping smaller groups under... - Microsoft Fabric Community

 

The second method is to add a custom column in Power Query.

 

Take my sample data for example. If the category column starts with Mountain, the custom column named Type created will be = Mountain. If it starts with Road, Type will be = Road.

 

This is my code:

 

= if Text.StartsWith([category], "Mountain") then "Mountain"
else if Text.StartsWith([category], "Road") then "Road"
else null

 

vhuijieymsft_0-1732243047361.png

 

This is the result after running:

vhuijieymsft_1-1732243047375.png

 

Then repeat the steps of the first method.

vhuijieymsft_2-1732243101985.png

 

The pbix file is attached.

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric 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.