cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver IV
Resolver IV

Add/Remove Bins in Bar Chart based on Slicer Selection

I have a bar chart that calculates percentages of negative reviews and groups them in increment ranges of 10%.

so 5 bins in total in the visual (10-20%, 20-30%, 30-40%, 40-50%, >50%)

 

There is also a slicer on the page called Threshold in which if if the user chooses a single selection starting from 10%. and has the option to choose, [20%, 30%, 40%, 50%]

 

Based on the threshold selection, bins the bar chart will be added or removed.

So if 10% is selected, any bin >= 10% is shown (Which would be all bins).

 

if 30% is selected, then the only bins shown would be [30-40%, 40-50%, >50%]

 

How can I go about Dynamically removing bins based on the users selection?

Creating relationship between thresholds table and Bin table will remove all bins with the exception of one (The one with 

the linked relationship)

 

see images below:

 

Chart with slicer

Capture.PNG

 

Table showing Bin values

Capture2.PNG

 

Threshold table used for slicer

Capture3.PNG

 

Intended Result

Capture4.PNG

 

 

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@mpicca13 , Assume You are already using a measure (called as a measure or use the calculation in use in values of visual)

Have a new measure  like

 

new measure =
var _max = maxx(allselected(Threshold),Threshold[Threshold])
return
if(max('High Negative'[Max]) >_max , [Measure], blank())



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

@mpicca13 , Assume You are already using a measure (called as a measure or use the calculation in use in values of visual)

Have a new measure  like

 

new measure =
var _max = maxx(allselected(Threshold),Threshold[Threshold])
return
if(max('High Negative'[Max]) >_max , [Measure], blank())



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Worked Like a charm, thanks @amitchandak 

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors