I have data of last 364+90 days in the data set
in my graph, I want to have a parameter [timeperiod] with 2 values, which would show- Last 90 days(BETWEEN TRUNC (SYSDATE - 90) AND TRUNC (SYSDATE - 1) , this is a oracle query)
and Previous year Last 90 days(BETWEEN TRUNC (SYSDATE - 90 - 364) AND TRUNC (SYSDATE - 1 - 365)
I wanted to create a calculated filed and use the Parameter to filter my data as per the selection. I have want something like this
if [timeperiod] ='Last90'
then DATE BETWEEN (TODAY()-90) AND (TODAY()-1)
DATE BETWEEN (TODAY()-454) AND (TODAY()-364)
I know this wont work, but hope I tried to explain what I wanted. Kindly help me with the calculated field syntax which would give the same output for my situation.
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.
Retrieving data ...