
Hi All,
I have to create a data alert for condition - if the sum of quantity is less than the 60% or rolling average for the past 7 days.
In Sheet 1 - I have the Sum of Quantity as the top chart and Quantity Rolling average over last 7 days: as the bottom chart.
Quantity Rolling average over last 7 days: =. WINDOW_AVG(SUM([Quantity]),-7,-1)
In sheet 2 I have the Quantity Rolling average over last 7 days chart with 60 percent of Quantity Rolling average over last 7 days shown over tooltip. And another calculated field Condition for alarm trigger, which is 1 when the alarm should trigger and 0 when it should not.
60 percent of Quantity Rolling average over last 7 days = Quantity Rolling average over last 7 days: * 0.6
Condition for alarm trigger- if [60 percent of Quantity Rolling average over last 7 days ] - SUM([Quantity]) > 0 then 1 else 0 end
In “Alarm condition” sheet - I have the Condition for alarm trigger.
In the Dashbaord I have “Alarm condition” chart as a floating chart.
Now when I am trying to create a alarm in Tableau server, it is giving me the following options -
But, if there is a previous date with condition - 1 it will still trigger an alarm every day even if I choose “Once the first time it is true” from the above options.
Like this -
I want the alarm to trigger whenever it happens first time, but I cannot limit the data to only the last day, because I have table calculations and the alarm condition will default to 0.
Wanted to understand how can I create the alert - the alarm should trigger only the fist time it occurs.
Thank you!
Regards,
Rishi Saka
Create a field along the lines of:
IF LAST() = 0 THEN [Quantity Rolling average over last 7 days] END
Set it along [Order Dt with Parameter]
That will give you a series with one data point, the most recent data point. You can make it a dual axis, but when you set the alert, set it on the value of that field. It will still trigger for "any true value", but now there's only one value.