Forum Discussion

non23's avatar
non23
Helper I
1 year ago
Solved

Stacked Column Chart - gradient color based on %

Is there a way to have a stacked column chart with gradient color as legend based on the value or percentage:

Highest percentage will take the darkest color and lowest for the lightest color.
my x axis is date and grade
y axis is value %
legend is size (can be removed just to have a gradient scheme for the size)

 

  • Hi non23 

     

    That will require conditional formatting  which is currently not supported on legends. 

  • Hi non23 

    Unfortunately, Power BI does not support conditional formatting in stacked column charts based on the measure value. This means you cannot apply a dynamic gradient color based on the percentage within the stack.

    Additionally, if your visual spans across multiple dates (i.e., a timeline), using a stacked column chart is not the most effective choice from a data visualization and UX perspective. It becomes very hard to compare changes in the dominance of different sizes over time.

    Instead, I recommend using a heatmap-style matrix visual — with dates as columns and sizes as rows — to visualize the relative distribution of sizes over time. This approach is much clearer and allows you to identify patterns or shifts in size dominance more easily.
    (Like the one shown in my screenshot.)

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

2 Replies

  • Hi non23 

     

    That will require conditional formatting  which is currently not supported on legends. 

  • Hi non23 

    Unfortunately, Power BI does not support conditional formatting in stacked column charts based on the measure value. This means you cannot apply a dynamic gradient color based on the percentage within the stack.

    Additionally, if your visual spans across multiple dates (i.e., a timeline), using a stacked column chart is not the most effective choice from a data visualization and UX perspective. It becomes very hard to compare changes in the dominance of different sizes over time.

    Instead, I recommend using a heatmap-style matrix visual — with dates as columns and sizes as rows — to visualize the relative distribution of sizes over time. This approach is much clearer and allows you to identify patterns or shifts in size dominance more easily.
    (Like the one shown in my screenshot.)

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