我在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)a
group by cat_count发布于 2020-06-13 21:38:29
看起来你想创建固定的垃圾桶,然后计算这些垃圾桶中的数量。查看这篇关于creating fixed bins and counting the members in Tableau的文章。
https://stackoverflow.com/questions/62357975
复制相似问题