0
votes

Sql :

sum(case when invoicestatus in ('a','b','c') THEN  amount ELSE 0 END)

Tableau parameter : pivoicestatus = 'a','b','c'

Tableau calculated field:?

I want to use pinvoicestatus (parameter) instead of hardcoding the value inside Tableau calculated field

1
Tableau parameters can take on a single value. They can have a list of several allowed values, but only have a single value at any particular time. Its hard to tell from your question, but are you looking to allow the user to interactively select a set of multiple invoice statuses? If so, there are some options available (a set comes to mind) but parameters aren't the best choice usuallyAlex Blakemore

1 Answers

0
votes

Tableau Calculated Field:

IF [pivoicestatus]='a'
THEN amount
ELSE IF [pivoicestatus]='b'
THEN amount
ELSE IF [pivoicestatus]='c'
THEN amount
ELSE 0
END