Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
How we can create the custom theme for stacked bar graph using json file which include the conditional rule. i used the below code to achive the same but it's throwin error as error while importing the json file. Looks like conditional format is not supported here? it should be done manually?
"barChart": {
"*": {
"dataPoint": {
"fill": {
"solid": {
"color": {
"$expr": "d => {
if (d.value <= 20) return '#ED9AA1';
else if (d.value <= 40) return '#E77881';
else if (d.value <= 60) return '#E15662';
else if (d.value <= 80) return '#B4454E';
else return '#87343B';
}"
}
}
}
}
}
}
Solved! Go to Solution.
Hi @Aksha_poojari - In Power BI does not support conditional formatting directly in the JSON theme file, you can define colors in a JSON file and then apply the conditional formatting rules on the top of it using conditions manually through the Power BI interface.
create a measure calcuation and define the conditional formatting as per your requirement.
Hope the above information helps you.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Thanks for the solution
Hi @Aksha_poojari - In Power BI does not support conditional formatting directly in the JSON theme file, you can define colors in a JSON file and then apply the conditional formatting rules on the top of it using conditions manually through the Power BI interface.
create a measure calcuation and define the conditional formatting as per your requirement.
Hope the above information helps you.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
84 | |
64 | |
52 | |
47 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |