【问题标题】:Need to translating below simple query in tableau through calculated field需要通过计算字段在表格中翻译以下简单查询
【发布时间】:2020-10-03 01:54:40
【问题描述】:

我在 impala 中有以下简单查询,我可以轻松地将其放入数据源中以创建所需的图表,但由于其他一些原因,我希望在 tableau 中完成。

我知道 tableau 和计算字段等。但现在我的思想被卡住了,不知道如何应对。

select cat_count,count(my_dim) from

(

select my_dim,

case when count(*) = 1 then 'A 1'
 when count(*) = 2 then 'B 2'

 when count(*) = 3 then 'C 3'

 when count(*) between 4 and 8 then 'D 4-8'

 when count(*) between 9 and 20000 then 'D >=9'end cat_count

 from my_table group by my_dim

) 一个

group by cat_count

【问题讨论】:

    标签: tableau-api calculated-field


    【解决方案1】:

    看起来您想创建固定的垃圾箱,然后计算这些垃圾箱中的数字。查看这篇关于creating fixed bins and counting the members in Tableau的帖子。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-31
      相关资源
      最近更新 更多