请在上方找到数据集我需要得到
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或空白,您可以执行类似操作
count(if [CL1] = 'NA' OR ISNULL([CL1]) then 1 end) + count(if [CL2] = 'NA' OR ISNULL([CL1]) then 1 end) + etc....