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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Andrey
Regular Visitor

Custom Visual with Conditional Formatting

Hello. I create a custom visual

tell me how I add Conditional Formatting

(https://community.powerbi.com/t5/Desktop/Custom-Visual-Using-Conditional-Formatting/td-p/323947

they say it is possible but it is not clear how. are there any examples?)

like this

My capabilities.json (i want add Conditional Formatting to totalPercentCritColor)

)

 

{
    "dataRoles": [
        {
            "displayName": "Value",
            "name": "Value",
            "kind": "Measure"
        }
    ],
    "dataViewMappings": [
        {
            "table": {
                "rows": {
                    "select": [
                        {
                            "for": {
                                "in": "Value"
                            }
                        }
                    ]
                }
            }
        }
    ],
    "objects": {
        "textOptions": {
            "displayName": "Text Options",
            "properties": {
                "phrase": {
                    "displayName": "Text",
                    "type": {
                        "text": true
                    }
                }
            }
        },
        "dataLabels": {
            "displayName": "Data Labels",
            "properties": {
                "dataLabelMeas": {
                    "displayName": "Data Suffix",
                    "type": {
                        "enumeration": [
                            {
                                "value": "руб.",
                                "displayName": "руб."
                            },
                            {
                                "value": "тыс.руб.",
                                "displayName": "тыс.руб."
                            },
                            {
                                "value": "млн.руб.",
                                "displayName": "млн.руб."
                            },
                            {
                                "value": "млрд.руб.",
                                "displayName": "млрд.руб."
                            },
                            {
                                "value": "%",
                                "displayName": "%"
                            }
                        ]
                    }
                },
                "dataLabelColor": {
                    "displayName": "Data Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "totalPercentCritColor": {
                    "displayName": "Sales Plan Crit Color ",
                    "description": "Цвет если план продаж не выполнен, см. Sales Plan Crit Value",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "totalPercentCritLevel": {
                    "displayName": "Sales Plan Crit Value",
                    "type": {
                        "numeric": true
                    }
                },
                "FormatText": {
                    "displayName": "FormatText",
                    "type": {
                        "formatting": {
                            "labelDisplayUnits": true
                        }
                    }
                }
            }
        }
    }
}

 

 

1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

Conditional Formatting is not supported by Power BI Custom Visuals API so far.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

[email protected]

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Conditional formatting is now supported in API 3.5 and above 

rahul_aginicx
New Member

Would you know if adding conditional formatting is in the roadmap and if yes, when would it be available in the custom visuals API?

We'll consider this feature but we can not share any ETA.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

[email protected]

Anonymous
Not applicable

Hi,

 

Any update on this. Is this feature available for usage in Custom Visual ?

 

Thanks,

Kiran BV

Hi @Anonymous - still not available, unfortunately. Would be great if it was, as I have a ton of uses for it 😞





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Thanks Ignat!

v-viig
Community Champion
Community Champion

Conditional Formatting is not supported by Power BI Custom Visuals API so far.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

[email protected]

thank you!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.