gpt4 book ai didi

filter - Tableau - 度量最大值的过滤器维度

转载 作者:行者123 更新时间:2023-12-04 17:39:13 29 4
gpt4 key购买 nike

我正在尝试计算值 E 的 D 列的最大值,它会为每个 A 列重置。稍后我只需要显示 A 的 MAX 行。

原始数据如下所示: enter image description here

想要的 View 应该是这样的: enter image description here

谢谢!

最佳答案

这是一个很好的问题示例,可以/应该使用 LOD 计算来回答这个问题。

首先,找出每个[名称](B 列)的最大[百分比](E 列):

{Fixed [Name]: MAX(Percentage)}

然后将该计算插入到另一个计算中,将其称为“每个名称的最大值”,如果 [百分比] 和 [每个名称的最大值] 匹配,该计算将仅显示 [字母](D 列):

IF [Percentage] = [Max Per Name] THEN [Letter] END

结果将是一个维度,显示匹配最大 [Percentage] 的 [Letter] 和不匹配时的“Null”。

从这里,只需过滤掉“Null”——结果将完全如您所愿。您甚至可以将 View 中的 [Percentage] 去掉,但仍能看到准确的 [Letter]。

Please note that while LOD Calculations are extremely powerful, they require a little more work to maintain and operate. They are a little more complex than normal calculations. Please take some time and read through this LOD Overview document to further familiarize yourself with their use/limitations.

关于filter - Tableau - 度量最大值的过滤器维度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55299831/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com