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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Colour the visual based on slicer selection

Hello,

 

I have a dataset with information regarding transaction data.

 

I created a scatter plot which shows how the price of the products diverged from the average price for the particular product:

 

s1.JPG

 

The dots are now coloured according to the product code. I also have an adjacent table where the basic statistics for each products are specified - average price, standard deviation etc. Once you select a certain product code, the visual looks like this:

 

s2.JPG

 

The aim of this visualisation is to spot the price outliers for each product - as you can see above, almost every product was purchased for the value similar to the average, while for one transaction - the price exceeded the average 2x.

 

I would now like to get to the cause of the outlier - for this, I would like to have an adjacent slicer, on the selection of which the colouring of the bubbles would be changed - for instance, if I chose the "Contractor" in the slicer, I would like for the bubbles' colours' to be based on the different contractors (this way I could see if for instance the one outlier was caused by the fact that a different contractor was used). Then, if I chose "country", the bubbles would be coloured by the country of goods dispatch - again, if the one outlier was coloured differently, this would explain why the products were purchased with such price disrepancy.

 

I would like to compare the bubbles under several categories - such as contractors, countries, product category, purchase teams and so on. 

 

Is this obtainable using measures/bookmarks/...?

 

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I think I phrased my question in a wrong way - anyways I found a solution using bookmarks:

 

https://community.powerbi.com/t5/Desktop/Change-Scatter-chart-Legend-Based-on-Dynamic-Slicer/td-p/47...

 

Unfortunately, a bookmark removes the filter previously applied to the plot - however as I understand, for now this appears to be the only solution.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Check, if this can help

https://community.powerbi.com/t5/Desktop/Change-Bar-Chart-Colour-based-on-slicer-selection/td-p/5102...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

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
Anonymous
Not applicable

Unfortunately, I have researched this issue a bit before and came across this post. I think the solution would not work in my case, as I would need to create several different columns with the hex codes. Due to this, it would not be possible to assign the conditional colouring of the visual to a column, since there would be several columns with the hex codes for categories.

 

Anyways, thanks for the input!

Anonymous
Not applicable

I think I phrased my question in a wrong way - anyways I found a solution using bookmarks:

 

https://community.powerbi.com/t5/Desktop/Change-Scatter-chart-Legend-Based-on-Dynamic-Slicer/td-p/47...

 

Unfortunately, a bookmark removes the filter previously applied to the plot - however as I understand, for now this appears to be the only solution.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors