I created a calculated field based on a parameter with [param1, param2, param3], and I want it to output the number of entries based on another filter [fil1, fil2, fil3].
Should look like something like this...I'm not sure if tableau can do it and if it can, how?
IF [parameter] = 'param1'
THEN [#Entries] WHERE [filter] = 'fil1', 'fil2', and 'fil3' //total entries
ELSEIF [parameter] = 'param2'
THEN [#Entries] WHERE [filter] = 'fil2' //entries based on fil2
ELSEif [parameter] = 'param3'
THEN [#Entries] WHERE [filter] = 'fil3' //entries based on fil3
Obviously that doesn't work, but should work like that????
EDIT: It's actually COVID19 data.
My parameters: Total Cases, Recoveries, and Deaths.
My filter is based on Health Status: Active, Recovered, and Died.
Based on a button, I want to choose 'Total Cases' and my graph of # of cases vs date will show all active, recovered, dead cases. If I choose 'Recoveries', the graph will only show recovered, and if I choose 'Deaths'. it will show deaths data.
Given your situation I feel that you need to create only one parameter and one related calculated field.
Create parameter1 for taking inputs say 1, 2, and 3.
create calculated field like this
CASE [parameter1]
WHEN 1 then SUM([field1 related with value 1 in parameter])
when 2 then SUM([field2 related with value 2 in parameter])
when 3 then SUM([field3 related with value 3 in parameter])
END
Just add this calculated field in view and control your results from 'show parameter
option.
I have done it sample world indicators
data in tableau.. Still if you are having problems, do tell me.
Screenshot of parameter created for your help.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments