Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
harmonvi
New Member

Color Theme updates with filters

I applied a custom theme with specific colors, but my line charts are not retaining those colors consistently across filters. In some cases, two lines even share the same color. I have added a jcon file to define the theme. 

2 REPLIES 2
v-lgarikapat
Community Support
Community Support

Hi @harmonvi 

Thanks for reaching out to the Microsoft fabric community forum.

@Thejeswar 

Thanks for your prompt response

 

@harmonvi 

To fix the issue with inconsistent line chart colors across filters, first ensure your JSON theme file is correctly formatted and explicitly defines colors for all data categories. Next, manually assign colors to specific fields in your visualization settings to prevent automatic reassignments. If filters are affecting color consistency, try binding colors to categorical values so they stay stable when the data updates. Another workaround is creating a calculated measure that assigns colors based on conditions. Finally, review your data to confirm there are no unintended overlaps or groupings causing duplicate colors. If you're using Power BI, check its settings for enforcing consistent color mapping across views.

 

I have added a few solved threads and learning documents here. They may help you.

Use report themes in Power BI Desktop - Power BI | Microsoft Learn

Solved: Line Chart Theme: X & Y axis - Microsoft Fabric Community

 

We appreciate your engagement and thank you for being an active part of the community.

 

Best Regards,

Lakshmi Narayana

Thejeswar
Super User
Super User

Hi @harmonvi ,

Per my understanding, I doubt if the themes imported using json files define the colour of the lines in the line chart. The Theme file usually has the below properties for a visual.

Thejeswar_0-1749615386182.png

You can try checking the imported theme in the below location to see if same colours are set in the theme file for theme colours

Thejeswar_1-1749615493808.png

For example, I have the line chart with a specific colour applied and exported the theme from the report. My Theme file just has the information of the theme colors I edited but nothing specific to the visual as shown below

Thejeswar_2-1749615877075.png

 

 

Ofcourse, It could be possible to control the colour of each line in a line chart in case if you have manually created the json theme file with specific headers for the line charts. This is something you can explore on.

 

Hope this helps! If this satisfies, kindly Accept it as Solution for others to benefit and appreciate a kudo!

Regards,

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.