Sql
:
sum(case when invoicestatus in ('a','b','c') THEN amount ELSE 0 END)
Tableau parameter : pivoicestatus = 'a','b','c'
Tableau calculated field:?
我想使用pinvoicestatus(参数),而不是硬编码Tableau计算字段中的值
答案 0 :(得分:0)
Tableau计算字段:
IF [pivoicestatus]='a'
THEN amount
ELSE IF [pivoicestatus]='b'
THEN amount
ELSE IF [pivoicestatus]='c'
THEN amount
ELSE 0
END