The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi everyone, I need your assistance.
I’ve configured a ColorPicker with a condition like this:
new formattingSettings.ColorPicker({
name: dataPoint.name,
displayName: dataPoint.displayName,
value: { value: dataPoint.value as string },
...(dataPoint.name === 'backgroundColorValue' && {
instanceKind: powerbi.VisualEnumerationInstanceKinds.ConstantOrRule
})
})
However, I’m unable to retrieve the condition (rule) inside it so I can process the colors for my data. How can I access the condition defined by the user in the Power BI UI and use it to apply colors to my visual?
In the Power BI documentation, for "Table based visuals" it is not possible to do conditional formatting. I am using "dataViewMappings" with the "table" type as follows:
"dataViewMappings": [
{
"table": {
"rows": {
"select": ["..."]
}
}
}
]
then my visual will not support Conditional Formatting, as mentioned in the Power BI documentation, right?
I hope you share the tutorial so that I can get the formatting condition. or confirm that I am using "dataViewMappings" with "table" type then this functionality will not work.
Thanks!
Solved! Go to Solution.
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:
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.
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.
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!
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
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:
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.