Forum Discussion

UK_User123456's avatar
UK_User123456
Resolver I
6 years ago
Solved

Additional Bar graph when selected

Hi All,

 

Below screenshot I have my bar graph which shows my sales over time for categories 1/2/3/4 and 6 are selected in my filter (Green bars). Is it possible to add in the red bar(s) when say categories 7 and 8 are selected and the red bar will appear? 

 

 

  • Hi,

     

    you can try to use a stacked column visual and customize the data colors for each category.

     

    If you create a stacked column with categories in the legend and a Filter by Category you will hace something similar to:

     

    Then you can customize Data Colors in the Format Menu (first categories in green and categories 7 & 8 in red):

     

     

    Finally you will have this visual:

     

    If you filter first categories, the columns appear in green color, but if you include 7 & 8 they will appear in red.

     

    Other way is to create value groups in the Category field in order to assign each group a color:

     

    https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning

     

    Please, chek this answer as Solution if it solve your issue.

6 Replies

  • Hi,

     

    you can try to use a stacked column visual and customize the data colors for each category.

     

    If you create a stacked column with categories in the legend and a Filter by Category you will hace something similar to:

     

    Then you can customize Data Colors in the Format Menu (first categories in green and categories 7 & 8 in red):

     

     

    Finally you will have this visual:

     

    If you filter first categories, the columns appear in green color, but if you include 7 & 8 they will appear in red.

     

    Other way is to create value groups in the Category field in order to assign each group a color:

     

    https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning

     

    Please, chek this answer as Solution if it solve your issue.

    • UK_User123456's avatar
      UK_User123456
      Resolver I

      Ok that may just work thank you, but what happens if I wanted to put a slicer in for the user to be able to say if they want to see Category 7/8?

  • TeigeGao's avatar
    TeigeGao
    Solution Sage

    Hi UK_User123456 ,

    In your scenario, it is not possible to display the extra data on the visual by clicking the visual directly, as a workaround, we can create an extra slicer to select the visual you want to see.

    Best REgards,

    Teige

    • UK_User123456's avatar
      UK_User123456
      Resolver I

      TeigeGao many thanks for your response, how would the extra slicer work? I am open to different ways of getting around the issue I am having.