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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bematth
Helper I
Helper I

Filter a visual based on a corresponding value of a selection made in a slicer

I apologize if this is confusing, as I've struggled with finding a good way to explain what I want to do. 

 

I have a dashboard that includes two sets of guage charts. 

The guage charts show the average percentage of court cases disposed within a set guideline. The first guage shows the average for any/all selected case types across all locations. But the second gauge is where I'm struggling.

 

Now, each court is assigned a size comparision group (small, medium, large, etc).

 

What I could like for the second gauge is to also display the average percentage of cases disposed within the guidlines of any/all selected case types of the corresponding size group of the court selected. 

bematth_1-1663955882525.png

So, since 3rd Circuit Court is in the "Big County" comparison group, the secong gauge should show the average percentage of cases of the selected case type across all courts in the "Big" comparison group. But if I were to change the slicer selection to the 38th Circuit court (in the "Large County" comparison group), the gauge would show the average percenage for all courts in the "Large" comparison group. 

 

Any suggestions?

Thank you so much!

 

5 REPLIES 5
lbendlin
Super User
Super User

I don't understand what you are trying to achieve. Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Here is a copy of the mock data file 

https://drive.google.com/file/d/12ZLi2JN9oBzWRUxvcKFkuoJ7iNm6RjHL/view?usp=sharing

 

Each location corresponds with a size comparison group, and I'd like the second guage to change to the applicable size comparison group based on what location is selected. 

What's the role of the SizeGroupTable?  Is it used for anything?

I had experimented with a few things that required the separate SizeGroupTable that didn't work, so currently, it has no role. 

  I don't claim to understand much about the business topic but both the number of measures and the verbosity of each measure is concerning.  I would take your base table and normalize it to the extent required for answering this question.  That would get rid of all the measures (bar one or two) and would simplify the remaining measures.

 

In order to calculate the average for the size group for a selected location you would create a measure that removes the location filter but keeps the size group filter, most likely via REMOVEFILTERS()

 

Side note:  Things like 

CALCULATE (
       SUM ( CASELOAD_DATA[QUANTITY]),
       CASELOAD_DATA[ACTION_NAME] = "Disposed within 14 days" || CASELOAD_DATA[ACTION_NAME] = "Disposed within 14 days and reduced to misdemeanor" ||CASELOAD_DATA[ACTION_NAME] = "Disposed from 15 to 28 days" || CASELOAD_DATA[ACTION_NAME] = "Disposed from 15 to 28 days and reduced to misdemeanor" ||CASELOAD_DATA[ACTION_NAME] = "Disposed after 28 days" || CASELOAD_DATA[ACTION_NAME] = "Disposed after 28 days and reduced to misdemeanor" ||CASELOAD_DATA[ACTION_NAME] = "Pending from 15 to 28 days" || CASELOAD_DATA[ACTION_NAME] = "Pending after 28 days"
   ) 

can be slightly simplified like

CALCULATE (
       SUM ( CASELOAD_DATA[QUANTITY]),
       CASELOAD_DATA[ACTION_NAME] IN {"Disposed within 14 days","Disposed within 14 days and reduced to misdemeanor","Disposed from 15 to 28 days","Disposed from 15 to 28 days and reduced to misdemeanor","Disposed after 28 days","Disposed after 28 days and reduced to misdemeanor" ,"Pending from 15 to 28 days","Pending after 28 days"}
   ) 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.