Tableau api 表中不同列的总计数

Tableau api 表中不同列的总计数,tableau-api,Tableau Api,请查找上面的数据集 我要去拿电话 1) RM count across the whole table and per column 2) GI count across whole table and per column 3) NA or blank across whole table and per column 我知道如何跨列计算计数 需要有关整个表的帮助除非您可以透视数据,否则您可以按如下方式添加每个列的计数: count(if [CL1] = 'RM' then 1 end) +

请查找上面的数据集 我要去拿电话

1) RM count across the whole table and per column
2) GI count across whole table and per column
3) NA or blank across whole table and per column
我知道如何跨列计算计数
需要有关整个表的帮助

除非您可以透视数据,否则您可以按如下方式添加每个列的计数:

count(if [CL1] = 'RM' then 1 end) + count(if [CL2] = 'RM' then 1 end) + etc....
对GI重复上述步骤

对于NA或blank,您可以执行类似的操作

count(if [CL1] = 'NA' OR ISNULL([CL1]) then 1 end) + count(if [CL2] = 'NA' OR ISNULL([CL1]) then 1 end) + etc....