Forum Discussion

msft-cap's avatar
msft-cap
Icon for Helper II rankHelper II
4 years ago

Background color based on slicer value

Hi - I am using below slicer and I need to show background color as below . Please share thoughts or alternate ways to represent the slicer with these values and colors

 

0-20  red

 

21-70  yellow

 

71-100  green

 

 

8 Replies

  • msft-cap , this approach only fixates a "border" outside of the slicer, you can change the black color when selected but not based on a condition. The colors have nothing to do with the slicer, that's what I'm trying to explain.

     

    This solution is quite a pain because you have to adjust the sizing until fits, I don't have the exactly .pbix because I closed without saving, but I kinda replicated the scenario to help you replicate and see if fits to your necessity.

     

    If it was helpful, please mark as solution to help others.

     

    https://drive.google.com/file/d/1Hk76txJaFnLcSmu8xdgQfZkbcCSTYVYI/view?usp=sharing

     

    Regards,

    Douglas.

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Icon for Community Support rankCommunity Support

    Hi msft-cap ,

     

    Maybe you can try bookmarks in power bi

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • msft-cap's avatar
      msft-cap
      Icon for Helper II rankHelper II

      v-chenwuz-msft could you elaborate on the solution? this is what I would like to represent on the report.

  • Hi,


    I'm afraid you cannot do that, the conditionals works only for all or none boxes, example all red backgrounds or all green border color and  so on.

     

    One similar thing you could do is insert a shape at the background.

     

     

    Hope it's helpful.

     

    Regards,

    Douglas.

     

    • msft-cap's avatar
      msft-cap
      Icon for Helper II rankHelper II

      dcrosseto I tried to insert the shape but the slicer is looking like this and background color is gray which I am not able to change it. Got highlighted as Black when a value is selected. Can you share the sample pbix file where you did this

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        msft-cap ,
        You need to format the shape and send it back. Please refer picture shared by dcrosseto 

  • Anonymous dcrosseto This is what I got. I understand it is not related to slicer but I need to represent visually that's it. I need the color outline in between the values also which I didn't get here.

     

    l

     

    • dcrosseto's avatar
      dcrosseto
      Icon for Resolver II rankResolver II

      msft-cap , for the color outline in between the values you can set transparency to 100%

       

       

      It will create that space but unfortunatelly you cannot get those padding higher.

       

      Check pbi file 

       

      If helpful, please mark as solved to help otherts.

       

      Regards,

      Douglas.