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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Isiluzun
Frequent Visitor

Assigning colours in json file

 Hello everyone,

I was wondering if it is possible to assign specific colours to specific years and to a calculated measure in the report with coding in JSON file. My current theme is as below. I am working on sales data from 2016 to 2018. I would like to use first 3 colours to depict the years 2016 to 2018 and the 4th one to depict the calculated measure that shows the deviation % between 2017 and 2018 in all the visualisation in my report.

 

{

    "name": "itheme2",

    "dataColors": ["#C00000", "#000000", "#808080", "#ffc000","#B0C6D7","#A9A6BB","#75BDA7","#92D050"],

    "background":"#FFFFFF",

    "foreground": "#FF0000",

    "tableAccent": "#FF0000"

 

Many thanks in advance!

 

1 ACCEPTED SOLUTION

Ok, that clarifies it all Frank.

 

Thank you very much!

Isil

View solution in original post

9 REPLIES 9
v-frfei-msft
Community Support
Community Support

Hi @Isiluzun,

 

Based on my test, it is not possbile to meet your requirement via json file. You can have a try to use Conditional formatting in the visual.

 

Capture.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hey Frank,

 

Thank you very much! I also dont have the conditional formatting option! Please take a look below.

 

Any idea what might be the reason?

 

CaptureX.PNG

 

Cheers,

 

Isil

Hi @Isiluzun,

 

What is the format of the column in the value field? If the column is in number format, that should work well.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello Frank,

 

Yes the format is decimal number somehow I do not have the conditional formatting option. Any other way to find this command somewhere else, on the upper ribbon for e.g?

 

Thank you so much for your help

Isil

Hi @Isiluzun,

 

For pie chart and clustered coloumn chart, we can only change color in the Data color field as the picture as below.

 

1.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Ok, that clarifies it all Frank.

 

Thank you very much!

Isil

Hi @Isiluzun,

 

What visual do you use?

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi Frank,

 

I use pie chart and clustered coloumn chart. I dont have conditional formating options for these visulaizations but I have it on my tables for the same values.

 

Many thanks

 

regards

Isil

Hi @Isiluzun,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors