Forum Discussion
How can I get back the conditional statement in instanceKind: powerbi.VisualEnumerationInstanceKinds
- 1 year ago
Hi Tung
According to Power BI documentation, conditional formatting is primarily supported for visuals like tables, matrices, and charts. However, for "table-based visuals" defined using dataViewMappings with the "table" type, conditional formatting is not supported. Reference link.If you want to enable conditional formatting in your custom visual:
- Consider switching from a "table" mapping to a "categorical" mapping (dataViewMappings.categorical). Categorical mappings allow access to individual categories and values, which are compatible with conditional formatting2.
- Ensure that your visual's settings include both instanceKind: ConstantOrRule and a proper selector configuration.
- Use the dataView.categorical.categories.objects[ ] property to retrieve and apply user-defined conditional formatting rules dynamically.
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi Tung
I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
Looking forward to your response!
Best Regards,
Community Support Team _ C Srikanth.