PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, April 22, 2022

[FIXED] How to filter a Pie chart by selection in table

 April 22, 2022     dax, pie-chart, powerbi, powerbi-desktop     No comments   

Issue

Please consider this scenario:

I have a table in Power-BI that's like this:

Country           Total Sales
-----------------------------
USA               2000
Canada            1400
Spain             3200

And I want to have a Pie chart in page that if user clicks on every rows, The pie shows sales type for that Country. For Example:

enter image description here

How can I connect these to visuals together?

Thanks


Solution

If the two visuals shows data from the same data source, then they will be "connected" by default, i.e. when the user clicks on a row in the table, the pie chart will show only the data from the selected country, and if the user clicks on a sector from the chart, the table will show only the amounts for this category.

If you have a table in your data source like this:

enter image description here

Then add a table in the report with columns Country and Sales like this:

enter image description here

By default amounts will be aggregated as sum, so the table will show sum of Sales per Country. You can change the default summarization of the currently selected field in Modeling tab:

enter image description here

Add a pie chart with Category field in the legend and Sales field for value. Change the value to be shown as percentage from the grand total like this:

enter image description here

Adding Sales field as tooltip will also show the amount when pointing to a sector:

enter image description here

Now when you click on a row in the table, the pie chart will show only the relevant data:

enter image description here

For more information take a look at Change how visuals interact in a Power BI report and Filters and highlighting in Power BI reports articles.



Answered By - Andrey Nikolov
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing