How to change the Line chart color dynalically for each slicer option using Field Parameter?

Anchal Rawat 0 Reputation points
2026-09-12T08:48:48.3866667+00:00

I'm using a Field Parameter as a slicer to switch measures on a line chart. When I manually change the line's color for one slicer option, the same color automatically applies to the other option(s) too — the line doesn't retain a distinct color per selection. How can I make each field parameter option display its own fixed line color?

Setup details:

  • Field Parameter table with two options: "Revenue per customer" and "Total Customer"
  • Field Parameter is placed in the Y-axis/Values well of the line chart to swap measures
  • No field is placed in the Legend well
  • Using the parameter as a slicer to toggle between the two options

User's image

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Roebe Ta 1,025 Reputation points Independent Advisor
    2026-09-12T09:27:21.0733333+00:00

    Hello @Anchal Rawat,

    Based on the screenshot and the description provided, this appears to be a Power BI report using a Field Parameter to switch between measures.

    As this question relates specifically to Power BI functionality and behavior, I recommend posting the question in the Microsoft Fabric Community (Power BI forums): https://community.fabric.microsoft.com/

    The Fabric Community is dedicated to Power BI and Microsoft Fabric topics and is actively monitored by Microsoft engineers, MVPs, and experienced community members. They are best positioned to provide guidance on:

    • Field Parameters and slicer behavior
    • Dynamic formatting and conditional colors
    • Visual customization limitations
    • Recent feature updates and roadmap changes
    • Power BI-specific workarounds and best practices

    The reason for this recommendation is that Microsoft Q&A primarily focuses on broader Microsoft 365 technologies, while detailed Power BI product questions receive better visibility and support in the Fabric Community.

    Thank you for your understanding, and I wish you success with your Power BI project!

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-12T08:49:03.9633333+00:00

    Use conditional formatting with a color field, not manual color selection.

    For a field parameter, the supported way to keep a fixed color per parameter option is:

    1. Create or use a field parameter that has a color column assigned to each parameter selection.
    2. Select the line chart, then go to Format visual.
    3. Expand the chart’s data colors card.
    4. Select the Conditional formatting (fx) button next to Color.
    5. Set Format style to Field value.
    6. In What field should we base this on?, select the field parameter’s color column.
    7. Select OK.

    This makes the visual color change with the selected field parameter, so each slicer option can have its own fixed line color.

    Important limitations for the scenario shown:

    • The color field must return a supported color value, such as a color name, hexadecimal code, or report theme color name.
    • The field parameter color approach works only when one parameter option is selected.
    • Editing the field parameter DAX to add extra columns is not supported and can lead to unexpected results. A field parameter definition supports three columns per field entry: name, column reference, and order.

    Since the current setup uses the field parameter in the Values/Y-axis well and a slicer to toggle one measure at a time, this approach matches the requirement.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.