cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pjn
Frequent Visitor

Using stacked bar chart as a slicer - but highlight entire bar when clicked

I'm fairly new to Power BI and have a question regarding the Stacked Bar Chart.

 

Configuration is as follows:

Axis = Employee Name

Legend = Billable / Non-Billable

Value = Hours

 

As expected this shows 1 bar per employee, each with 2 segments to indicate the billable and non-billable portions.

 

My client effectively wants to use the stacked bar chart as a slicer at the Axis (Employee) level rather than the Legend (Billable/Non-Billable) level.

 

i.e. When I click on an individual segment for an employee, the default behaviour in Power BI is to filter to that employee and segment. Is it possible to configure the stacked bar chart so it visually highlights the entire bar (and subsequently filters to employee only)?

 

 

I noticed that one of the online sample dashboards does this but I can't see any option in the chart settings to replicate what he's done. See the 'Engineers Billable Hours' page on this dashboard as an example: http://community.powerbi.com/t5/Data-Stories-Gallery/Business-Sales-Report-PowerBI/m-p/60491

 

Thanks

Pete

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Using stacked bar chart as a slicer - but highlight entire bar when clicked

Hi @pjn,

 

Based on my test, currently stacked bar chart not support multiple select feature.

For you requirement, you can post this to ideas.

 

In addition, I find a same request for 100% stacked bar chart. Smiley Happy

Multiple selection by Legend in 100% Stacked chart

 

Regards,

Xiaoxin Sheng

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

View solution in original post

4 REPLIES 4
Community Support
Community Support

Re: Using stacked bar chart as a slicer - but highlight entire bar when clicked

Hi @pjn,

 

According to your description, you want to the effect like below?

 

Capture.PNG

You can open the "Format" tab and click on "Edit Interactions" to open the interaction UI, then you can modify it:

Capture2.PNG

 

Notice: click on one visual to active it will show the its interaction for other visuals.

 

Regards,

Xiaoxin Sheng

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

Re: Using stacked bar chart as a slicer - but highlight entire bar when clicked

Hi @v-shex-msft

 

Thanks for the reply. I'd tried changing the interactions but still couldn't get the effect I was after. I've added some screenshots below to show it.

 

With no item clicked in chart, everything is highlighted accordingly (this is okay)

 

first.png

 

Then when I click on one element in this chart (in this case I clicked the 470.50 section), everything dims except for that single element (this is the default behaviour).

 

 

current.png

 

What I'm hoping to achieve is that clicking on either the 470.50 or 1023.50 elements in that chart highlights the entire row rather than the one element I clicked on (screenshot was simulated in Paint because I can't get it to do this!)

 

expected.png

 

I've tried experimenting with Edit Interactions but this only seems to define what happens between charts, and not the behaviour of the chart itself. I couldn't see anything in the Format pane either. It's possible that I'm missing something really obvious though!

 

Regards

Pete

 

Community Support
Community Support

Re: Using stacked bar chart as a slicer - but highlight entire bar when clicked

Hi @pjn,

 

Based on my test, currently stacked bar chart not support multiple select feature.

For you requirement, you can post this to ideas.

 

In addition, I find a same request for 100% stacked bar chart. Smiley Happy

Multiple selection by Legend in 100% Stacked chart

 

Regards,

Xiaoxin Sheng

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

View solution in original post

pjn
Frequent Visitor

Re: Using stacked bar chart as a slicer - but highlight entire bar when clicked

Thanks for the confirmation @v-shex-msft

 

Out of curiosity I've left a comment on the dashboard page I originally linked to, asking the author how he did it. I'm going to assume he's used a custom visual to achieve the effect (or maybe some clever stacking of multiple charts, one behind the other)

 

Thanks again for doing your own tests and your suggestions.

 

Pete

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors