How do I create a donut chart where the segments dynamically change based on multiple user-selected dimensions

0 votes

How do I create a donut chart where the segments dynamically change based on multiple user-selected dimensions?
I want to build a dynamic donut chart in Power BI where users can select different dimensions (e.g., Region, Product Category, Sales Channel) to adjust the chart’s segments. The visual should update based on slicer selections while maintaining correct aggregations. What is the best approach using DAX and field parameters to enable this functionality?

Mar 19 in Power BI by Evanjalin
• 22,610 points
50 views

1 answer to this question.

0 votes

To create a donut chart that updates dynamically with user-selected dimensions in Power BI, carry out the following steps:

1. Create a Field Parameter for Dynamic Dimensions

These Field Parameters allow users to switch between different segment categories dynamically.

Go to Power BI Desktop > Modeling > New Parameter > Fields and create it.

Name it Segment Selector and add the dimensions you need users to toggle:

  • Region
  • Product Category
  • Sales Channel

Enable the add slicer option on this page.

This creates a new table in which selected fields are found, thus enabling users to switch dimensions dynamically.

2. Add Field Parameter in the Donut Chart

Add the Segment Selector field to the Legend in the donut chart.

Use Sales Amount or any other measure for this Values section. The segments of the chart will be updated according to the user's selection through the slicer with the corresponding dimension.

3. Ensure Proper Aggregation Using DAX

If required, create dynamic measures to ensure all calculations are done correctly:

DynamicSales =  
CALCULATE(  
    SUM('Sales'[SalesAmount]),  
    ALLSELECTED('Segment Selector')  
)

This ensures that the data aggregates correctly based on the selected dimension.

4. Test the Interaction

When users select different dimensions in the slicer, the donut chart will automatically update its segments, providing an interactive and flexible visualization.

answered Mar 19 by anonymous
• 22,610 points

Related Questions In Power BI

0 votes
0 answers
0 votes
2 answers

How do I create a Power BI visual that dynamically adjusts based on user-selected filters and slicers?

The application of slicers and filters in ...READ MORE

answered Jan 23 in Power BI by anonymous
• 21,730 points
156 views
0 votes
1 answer

How can I format Power BI visuals to dynamically change based on user-selected measures or dimensions?

Dynamically change Power BI visuals corresponding to ...READ MORE

answered Dec 30, 2024 in Power BI by Anu
• 3,020 points

edited Mar 6 216 views
0 votes
1 answer

How can I create a multi-row card that dynamically adjusts based on the number of selected values?

To create a multi-row card in Power ...READ MORE

answered Mar 18 in Power BI by anonymous
• 22,610 points
56 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,563 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,130 points
2,894 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,675 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 1,834 views
0 votes
1 answer

How do I create a dynamic KPI card that changes color based on user-selected thresholds?

To create a dynamic KPI card that ...READ MORE

answered Mar 17 in Power BI by anonymous
• 22,610 points
77 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP