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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
hb0135
Helper III
Helper III

How to change the colour of inserted shape when we select on slicer

Hello 

Need a help i want change the colour of inserted shape when i select the particular slicer as shown below

hb0135_0-1692682067763.png

BR,
HB0135

 

2 ACCEPTED SOLUTIONS
JoBI
Resolver I
Resolver I

You can create a measure like this:

Shape Colour = IF(ISFILTERED(Zones[Zone]), "red", "blue")

Then in the Shape Style area put this measure as Color Fill

JoBI_0-1692684022917.png

Now if any value of the "Zones" is selected the color will change to red. 

View solution in original post

Hi @hb0135 

 

If you want to assign each value to a colour you could better use a SWITCH:

Shape Colour =

var selectedZone= SELECTEDVALUE(Zones[Zone])
return SWITCH (selectedZone,
"Zone 1", "red"
"Zone 10", "#41AC4C",
"Zone 11", "#FFD400",
"green")

 

And then, apply the step mentioned by JoBi

View solution in original post

4 REPLIES 4
hb0135
Helper III
Helper III

Hello,
Thanks for help
BR

JoBI
Resolver I
Resolver I

You can create a measure like this:

Shape Colour = IF(ISFILTERED(Zones[Zone]), "red", "blue")

Then in the Shape Style area put this measure as Color Fill

JoBI_0-1692684022917.png

Now if any value of the "Zones" is selected the color will change to red. 

Hello,
Thanks for help,
BR

 

Hi @hb0135 

 

If you want to assign each value to a colour you could better use a SWITCH:

Shape Colour =

var selectedZone= SELECTEDVALUE(Zones[Zone])
return SWITCH (selectedZone,
"Zone 1", "red"
"Zone 10", "#41AC4C",
"Zone 11", "#FFD400",
"green")

 

And then, apply the step mentioned by JoBi

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.