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

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.

Reply
KadinS
Frequent Visitor

Dynamically Changing Graph Data Based on Matrix Selections

Hi all! I'm trying to dynamically choose what data is showing in graphs, with a pre-set details. For example, if I have a data set like this:

KadinS_0-1600401476903.png

 

I want to be able to select a category value from a matrix, and have that filter a pie chart (for example). However, where it gets tricky is that I want the pie chart to (by default) be filtered to a pre-determined category already. For instance:

  • When nothing in the matrix is selected, the pie chart only shows rows with the Alpha category. 
  • When Alpha is selected in the matrix, the pie chart shows rows with the Alpha category.
  • When Beta is selected in the matrix, the pie chart shows rows with the Beta category.
  • When Delta is selected in the matrix, the pie chart shows rows with the Delta category.

 

My work so far is available in this file: Example. I've created two measures which allow me to determine which category is selected (_SelectedCategory), and another that I was trying to use as a filter for the graph (_PieGraphFilter). Unfortunately, I've had no luck and have hit a bit of a wall.

 

Any advice on how to approach this problem would be greatly appreciated. Thanks in advance!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

Hello @KadinS

For your case, the category must come from two matrix and pie chart tables

You can try this sample pbix file.

Best regards

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

Hello @KadinS

For your case, the category must come from two matrix and pie chart tables

You can try this sample pbix file.

Best regards

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@KadinS , is filtered and has one value that should able to help you.

 

A measure like this on pie visual

if(isfiltered(Table[Category]), [Measure], calculate([measure], table[Category] ="Alpha"))

 

Also, refer: https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak, thanks for your speedy response.

 

I'm not sure I understand what you mean sorry. Referring to the example P.BI report, is Table[Category] meant to represent Source[Category] or Categories[Category] (where Source is the raw data, and Categories table with the unique categories [which I'm using for the Row Labels in the matrix]). And which [Measure] are you referring to?

 

Not sure if it's worth mentioning the Data Model I have set up as well, that simulates what's going on in my actual (non-example) report.

 

Thanks for your time.

@KadinS , I have not seen your file yet. Somehow did not notice the link for the first time. The solution is based on the assumption that table and pie has a common category which is used and we want to filter that 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI 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.

Top Kudoed Authors