Tableau计算出的基于选定维度的度量标准的字段不同总和

问题描述 投票:0回答:1

我已将此表导入到tableau中,并且在将其正确汇总到计算字段中时面临挑战。我想对base_count求和,但不想对重复的base_count求和。

我只想按日期和问题求和不同的基数

enter image description here

我希望图表结果看起来像这样,在sql中是

select date, problem, sum(count), sum(distinct base_count) as base_count
from table
group by date,problem

enter image description here

我尝试排除,包含,固定级别的详细信息表达,我是Tableau的初学者。谁能更好地了解使用哪些功能来计算不同的base_count 按问题维度的日期排序

tableau calculated-field
1个回答
0
投票

通过使用FIXED通过我的队友在Tableau中找到了答案:

首先使用以下内容创建一个计算所得的字段名称base

{FIXED [url], [date], [problem],[base_count]: max([base_count])}

然后执行另一个计算字段:

Sum([count])/Sum([base])
© www.soinside.com 2019 - 2024. All rights reserved.