Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to filter a legend on a visual?

Hi all,

 

I have a visual that has 3 filter tables applied: Position, Product, and Market Type.

 

I would like my legend to be filtered when selecting the various table filters. Is this possible? 

 

Thanks,

 

Brian

8 Replies

  • @helmsb One possible workaround - turn off the legend altogether. Then use a DAX formula to get the selected value for each filter condition and show it under the chart on a card. 

     

    Something like:

     

    position selected = IF(ISBLANK(SELECTEDVALUE(YourTable[position]), "", SELECTEDVALUE(YourTable[position])
     
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Interesting idea! Would i be able to somehow format the cards to be a specific color tied to the specific filter condition? Otherwise it wont be possible to know which line is which in a scenario like this:

       

      • sanimesa's avatar
        sanimesa
        Icon for Post Prodigy rankPost Prodigy

        Anonymous Not sure about this - my assumption was you are showing only one line at a time. In which case you do not need the color to distinguish.

        you may be able to set all the line colors of a particular type to a fixed color. So, assuming you have two filters and each correspond to a different color, you can probably use a fixed color on your card. 

        Again, I am probably not getting your use case completely.