Forum Discussion

0Experience's avatar
0Experience
Helper III
5 months ago
Solved

Conditional Formatting with a Legend

Hi everyone, I’m hoping to get some ideas from the community. As many of you know, when a visual uses a legend, Power BI doesn’t allow us to apply conditional formatting (from a table or measur...
  • v-karpurapud's avatar
    v-karpurapud
    4 months ago

    Hi 0Experience 


    Thank you for the thorough explanation. Currently, in Power BI, when a visual uses a legend for multiple series, the legend determines the color assignment for each series. As a result, conditional formatting for data colors using DAX measures or field values may not be available, as it is overridden by the legend.

    See this reference: https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-conditional-formatting#co…

     

    For cases where you need consistent colors across visuals and pages, using a Report Theme (JSON) is recommended. This approach centralizes the color palette and helps maintain consistency, though colors are assigned based on the series order and may change if legend values are filtered.

     

    If you need fully dynamic, data-driven color control while keeping the legend (including in Focus Mode and exports), native Power BI visuals do not currently support this. In such situations, a custom visual like Deneb can be used to explicitly map colors and retain a functional legend.

     

    Reference:https://learn.microsoft.com/en-us/power-bi/create-reports/report-themes-create-custom
     

    If you have any further questions, feel free to reach out and we'll be glad to assist.
     

    Regards,

    Microsoft Fabric Community Support Team.