最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

powerbi - Unable to Retrieve Conditional Formatting Rule in Power BI Custom Visual - Stack Overflow

programmeradmin1浏览0评论

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?

Here is my capabilities.json configuration:

"backgroundColorValue": {
  "displayName": "Background Color",
  "type": {
    "fill": {
      "solid": {
        "color": true
      },
    }
  }
}

My Question: In the Power BI documentation, for "Table-based visuals", it is mentioned that conditional formatting is not supported. I am using dataViewMappings with the "table" type as follows:

"dataViewMappings": [
   {
    "table": {
      "rows": {
        "select": ["..."]
      }
    }
   }
]

Does this mean my visual will not support Conditional Formatting, as mentioned in the Power BI documentation? If so, what is the correct approach to retrieve the conditional formatting rule and apply it to my visual?

I hope you can share a tutorial or confirm whether "table" type visuals do not support conditional formatting.

Thanks in advance!

发布评论

评论列表(0)

  1. 暂无评论