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 ,
I want to create a parameter for the selection on Category and Country in the chart . I have two chart in the below table structure. I want to combine them in one . If i select Category in parameter it should show be chart 1 and if i select Country in parameter then it should be chart 2 . Is it possible to achieve it in power bi.
Data :
Category | Sub Category | country | State | Sales | Quantity Q2 |
Furniture | Chairs | USA | CA | 100 | 10 |
Furniture | Tables | USA | FL | 100 | 20 |
Automobile | Cars | USA | IL | 100 | 30 |
Automobile | Bikes | USA | NY | 700 | 40 |
Furniture | Chairs | India | MP | 100 | 13 |
Furniture | Tables | India | HP | 500 | 22 |
Automobile | Cars | India | KL | 100 | 54 |
Automobile | Bikes | India | KA | 100 | 60 |
Furniture | Chairs | USA | CA | 100 | 30 |
Furniture | Tables | USA | FL | 300 | 29 |
Automobile | Cars | USA | IL | 200 | 88 |
Automobile | Bikes | USA | NY | 100 | 22 |
Furniture | Chairs | India | MP | 500 | 21 |
Furniture | Tables | India | HP | 100 | 33 |
Automobile | Cars | India | KL | 600 | 54 |
Automobile | Bikes | India | KA | 100 | 60 |
Solved! Go to Solution.
Thankyou, @DataNinja777, for your response.
Hi nish18_1990,
We appreciate your query on the Microsoft Fabric Community Forum.
Based on my understanding of the scenario, please find attached a screenshot and a sample PBIX file which may assist in resolving the issue:
1.With Category View selected:
2.With Country View selected:
The slicer selects a view group, such as Category or Country. Each group is linked, via the GroupKey, to its respective fields in the ViewFields parameter table. The relationship dynamically controls which fields appear in the visual, thereby providing a seamless toggle between hierarchies.
We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric Community.
Thank you.
Thankyou, @DataNinja777, for your response.
Hi nish18_1990,
We appreciate your query on the Microsoft Fabric Community Forum.
Based on my understanding of the scenario, please find attached a screenshot and a sample PBIX file which may assist in resolving the issue:
1.With Category View selected:
2.With Country View selected:
The slicer selects a view group, such as Category or Country. Each group is linked, via the GroupKey, to its respective fields in the ViewFields parameter table. The relationship dynamically controls which fields appear in the visual, thereby providing a seamless toggle between hierarchies.
We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric Community.
Thank you.
Hi, The parameters are working as expected. I have a question : I need to add a parameter for showing Top 3,5,10 Categories or Countries based on the views we have selected. The top N should work on field Quantity. Could you please help me to achieve this view .
Thanks
Hi @nish18_1990 ,
Yes, you can absolutely combine those two charts into a single dynamic visual in Power BI. The most effective method is using a feature called Field Parameters, which is designed specifically for this purpose. It allows a user to select which data column (or hierarchy) they want to see in a chart using a simple slicer.
To get started, you will create the parameter itself. Navigate to the Modeling tab in the Power BI ribbon, click the New parameter button, and then select Fields. In the window that appears, you can give your parameter a name like "View By". Then, from your main data table, drag the fields you want to switch between into the box. To match your request, you should add Category, Sub Category, country, and State. When you click "Create", Power BI will automatically generate a new table for the parameter and place a slicer for it on your report page.
Next, you will build the visual that uses this new parameter. Add a Matrix visual to your report. From the newly created "View By" parameter table in your Fields pane, drag the "View By" field into the Rows section of the matrix. Then, add your measures to the Values section. These would be simple DAX calculations like the ones below.
Sum of Sales = SUM(Data[Sales])
Sum of Quantity Q2 = SUM(Data[Quantity Q2])
Once set up, the slicer will control the matrix. Selecting Category will group the data by Category and Sub Category, while selecting country will instantly pivot the matrix to show the data by country and State. This gives you one efficient visual that does the job of two.
Best regards,
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |