Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have a clustered bar chart displaying Average Dialy Visits (counts) by month (count on y axis, month on x axis) collected at a number of different locations. I have a slicer allowing the end use to select 1 or more locations (there are 45 locations in total). In order to facilitate comparaison of monthly visitation counts for different locations, I am using the locations as the categories for the "Legend" field.
Typically, the end use will only select a few locations at a time (let's say a max of 3). However, by default Power BI assigns a static color to each category. What I would like to do is assign the legend colors dynamically based on the number of locations selected. For example, if only one location is selected it is always green. If two are selected, one is green and one is blue. If a third is selected, green, blue and yellow. Etc.
It really doesn't matter which location is assigned which color when selected so that isn't a constraint.
I have a clustered bar chart displaying Average Dialy Visits (counts) by month (count on y axis, month on x axis) collected at a number of different locations. I have a slicer allowing the end use to select 1 or more locations (there are 45 locations in total). In order to facilitate comparaison of monthly visitation counts for different locations, I am using the locations as the categories for the "Legend" field.
Typically, the end use will only select a few locations at a time (let's say a max of 3). However, by default Power BI assigns a static color to each category. What I would like to do is assign the legend colors dynamically based on the number of locations selected. For example, if only one location is selected it is always green. If two are selected, one is green and one is blue. If a third is selected, green, blue and yellow. Etc.
It really doesn't matter which location is assigned which color when selected so that isn't a constraint.
Hi @cleslie,
Nope, current power bi not support this.
In fact, condition formatting feature support to use other column value to setting color, but you can't create dynamic calculate column/table based on slicer/filter to make color fields dynamic.
BTW, you can create dynamic measure based on slicer/filter, but it can't use on legend and axis fields.
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
113 | |
72 | |
62 | |
46 |