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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Slicer color (by changing)

Hello Community,

 

i have several slicer on a page (cause i need it). The slicer have always the value "All" or "different Data"... well if it possible to change the color (backgroud or text) somewhere (in the slicer) if the slicer value isn´t "All"?

 

thx

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Based on my test,it is not supported  currently. You can propose your new idea via below link and add your comments there to make this feature coming sooner.

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
westwrightj
Resolver III
Resolver III

Hey Kolie,

 

   You sure can change the color based on the filter selection

 

    First you want to make a measure to define what colors you want to swap between

   

    In this case we will say we want the background color to be white when all is selected and blue when other items are selected

 

Selected Color =

IF(SELECTEDVALUE(Test[Column1]) = "All", "#f8f8f8", "#6194a3")

 

Next we will set the background color to use this measure in the visual you want to have change

 

westwrightj_0-1594829996881.png

 

Now just try out your filter and see the color change

 

 

 

westwrightj_1-1594830019315.png

 

PBIExample2.gif

 

Anonymous
Not applicable

Hi @westwrightj ,

 

ok, i tryed Your way... well, lessons learnd:
1. it works, but u can´t change the slicer-color itself, but u can change something esle.. in my case i use a textfield netz to slicer.
2. Value "All" is in my case "" 

3. But waht is the value of "Multi select"?

 

Ty

Anonymous
Not applicable

🙂

no, no, no 😄 this isnt the task.

 

I wanted to change the color in slicer not in visual. Look, i want to see if slicer is not according to value "all", cause i have too many of them... visuals still have the same colors.

 

example

- slicer 1 : customer [Value "All" , or Number]

- slicer 2:  cost unit [Value "All", or selected cost unit]

so if slicer 1 isnt "all" then change bg color of slicer....

 

 

Hi @Anonymous ,

 

Based on my test,it is not supported  currently. You can propose your new idea via below link and add your comments there to make this feature coming sooner.

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
amitchandak
Super User
Super User

@Anonymous , In slicer Background color conditional formatting is allowed.

Create a measure like this

color measure = if(isfiltered(Table[Column]),"Red","Green") // isfiltered false means all.

Now use this with option Field in the conditional formatting

Steps:

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

also referv

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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