I would like to create a formula that check if 6 days or more one variable is above 30, if that it's TRUE I want to receive a table with those values. PS: I have a table from the last 5000 days with information of the weather, I do normally everything manually with Excel, but I want to automatizate it with Tableau,
Thanks,
Agustin,
Here is an additional version of what Eric developed.
Flag every point above 30:
IF SUM([Quantity])>30 THEN 1 ELSE 0 END
Sum up flags in a window of 6, and
Mark first point in a sequence of 6 in a row above 30:
IF WINDOW_SUM([Flag > 30],0,5)=6 THEN 1 ELSE 0 END
Lookback to see if six points back was the start of a sequence:
IF [Flags over Window]=1
OR LOOKUP([Flags over Window],-1)=1
OR LOOKUP([Flags over Window],-2)=1
OR LOOKUP([Flags over Window],-3)=1
OR LOOKUP([Flags over Window],-4)=1
OR LOOKUP([Flags over Window],-5)=1
THEN 1 ELSE 0 END
As Eric said, the last calculation can be used a filter.
Please see workbook attached in the Forum Thread.