Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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....
Does someone know where I can create new groups?
Many thanks in advance!
Solved! Go to Solution.
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.
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
This is the result after running:
Then repeat the steps of the first method.
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!
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.
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
This is the result after running:
Then repeat the steps of the first method.
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!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Fabric update to learn about new features.
User | Count |
---|---|
53 | |
35 | |
21 | |
16 | |
8 |