如果矩阵列相等,如何更改背景颜色

发布于 2025-01-09 17:32:12 字数 242 浏览 2 评论 0原文

我在更改 Power BI 矩阵表中的背景时遇到问题。 我尝试了一些事情但没有成功。

想法如下图所示。

输入图片此处描述

如果您有一些关于如何为此编写 DAX 公式的想法,请告诉我。

I am having issue in changing background in matrix table in Power BI.
I tried few things but did not succeed.

Idea is presented in image below.

enter image description here

Please let me know if you have some Idea how to write DAX formula for this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

似梦非梦 2025-01-16 17:32:12

您好,PBI 不正式支持使用条件格式,并且可以使用以下措施 [字段值] 选项进行格式化。

COLOUR EQUAL ROW = 

IF  (HASONEVALUE(TABLE[VALUE1])
    ,IF( MAX(TABLE[VALUE1] = MAX(TABLE[VALUE2])
        ,"lightgreen"
        ,"white"
    )
    ,BLANK()
)

输入图片此处描述

更新:
我已经添加了编辑后的度量并且它起作用了。请使用 MAX 而不是更早的版本。
输入图片此处描述

这在条件格式中可用。并选择测量

Hi this is not officially supported by PBI use conditional formatting and for formatted by use the following measure [Field Value] option.

COLOUR EQUAL ROW = 

IF  (HASONEVALUE(TABLE[VALUE1])
    ,IF( MAX(TABLE[VALUE1] = MAX(TABLE[VALUE2])
        ,"lightgreen"
        ,"white"
    )
    ,BLANK()
)

enter image description here

UPDATE :
I have added the edited measure and it worked. Please use MAX instead of earlier.
enter image description here

This is available in conditional formatting. and select the measure

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文