Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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
@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:
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:
@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.
I also forgot to mention that all my data points are currently measures suming the column data. I like to do that since it simplifies the DAX forumulas i need to write.
Hi @Anonymous ,
I'm afraid it's not able to use slicer to change legend dynamically. Would you please check the jakepwills's reply in https://community.powerbi.com/t5/Desktop/Dynamic-Legends-via-Slicer-2017/m-p/162296#M70688 to see if it will help.
As a workaround, could you please combine the buttons and bookmark: https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi,
This ended up not helping me too much. Is there a way to filter out the blank columns after a table filter has been applied? I think this would fix my legend issue. I tried using a visual level filter (show items when the value 'is not ' 0') but that ended up causing the entire visual to go blank regardless of what filters i selected.
Thanks,
Brian
I thought i would circle around and give a final determination on this. A dynamic legend is a must in my book. But since Power BI doesnt have it, what i did is used colored shapes behind the position slicer options and then manually formatted the colors to be the same.
This is still not ideal as i had to break 1 graph out into 3 graphs; otherwise one couldnt diferentiate the different products tied to the same resource. And there is a "understood rule" that the darker line is the DA postion while the lighter line is the RT position. Dynamic legends please.
Thanks,
Brian
No problem. The reason why i really like this graph is that i can look at the market type or products of all my positions on the fly. So i can look at as many lines as i would like. I can compare Energy DA prices of all my positions or RT regulation prices of 2 positions, etc.
The only issue i have is the darn legend not dynamically updating to show what each line represents.