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
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!
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.