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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Highlighting Selected Show in Bar Chart

Hi All, 

 

Does anyone know how can you highlight a bar in a barchart with a dropdown filter, without hiding the rest of the values/bars

 

Please let me know if you need any more information, as I fear this is not as simple as I hoped!

 

Thanks in advance, and help would be greatly appreciated!

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

In your measure you are not comparing nothing so the result is not getting the highlith you need.

 

Measure = SWITCH(TRUE(),SELECTEDVALUE('Processed Data'[Title]) =  SELECTEDVALUE(TAble[Slicer]),"#800000")

I have added a part of the formula that you need to compare with the slicer you have. 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Create a table with the values you want for our slicer assuming that is based on the x-axis value of the bar chart. Do not relate this with your other tables.

 

Then add the following measure:

Measure = SWITCH(TRUE();SELECTEDVALUE('Table'[X-AxisColumn]) = SELECTEDVALUE(SlicerTable[Colun]); "#000000")

 

Now go to the bar chart data columns and use the conditional formatting with the field value and select this measure.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix

 

Thanks so much for this, I am relatively new to Power BI and Dax but this has helped a lot!

 

However, unfortunately I am having some issues; this is my version of the measure: 


Measure = SWITCH(TRUE(),SELECTEDVALUE('Processed Data'[Title]),"#800000")
 
Then in the Data Colors I changed the conditional formatting to "Format by Field Value" then based on the field "Title" (I chose First as it had to be either First or Last). However, the table pops up with a yellow warning sign now and the bars haven't changed colours. The warning says "We found a value we don't recognise for default colour" - I looked up the colour sopecifically so I believe it is one, do you have any idea how I can fix this?
 
Thanks

 

 

 

 

 

Hi @Anonymous ,

 

In your measure you are not comparing nothing so the result is not getting the highlith you need.

 

Measure = SWITCH(TRUE(),SELECTEDVALUE('Processed Data'[Title]) =  SELECTEDVALUE(TAble[Slicer]),"#800000")

I have added a part of the formula that you need to compare with the slicer you have. 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.