3 Replies Latest reply on Jul 27, 2016 2:33 AM by Ben Neville

# Anomaly Analysis - How to show only specific points according to a "rule"/special filter

Hi,

Consider you have a plot of points:
X is the date
Y is the usage amount per counterparty.

I have some points that are far from the trending line or general behavior. I need to show only them.
For example every point with usage amount more then 140% should be shown, others should be omitted.

How can I construct such plot?
I have 120 counterparties and I want to show all anomaly points for all counterparties.

• ###### 1. Re: Anomaly Analysis - How to show only specific points according to a "rule"/special filter

This really depends on how complex the logic needs to be. In the example you mentioned, you should just be able to drag [Y] to your filters and set a minimum of 140. Optionally, you could also create a calculation like this:
IF [Y] > 1.4 THEN [X] END

• ###### 2. Re: Anomaly Analysis - How to show only specific points according to a "rule"/special filter

Hi Ben,

I mean that if for example most of my usage per counterparty A is around 1M and I have a day where the usage jumped to more then 140% of the average of whole history of usages I want tableau to show only the usage values that are greater then 1.4 * average(usage across the table).

• ###### 3. Re: Anomaly Analysis - How to show only specific points according to a "rule"/special filter

Ah.
How about something like:
SUM([Y])/WINDOW_AVG(SUM([Y]))

Just take that field, place it on your filters shelf, select the "At Least" option, and set it to 1.4.

The trick here is to calculate the average of the whole table (unless you already have that number handy). You then use the actual value to calculate the percentage, and filter accordingly. This works as a filter due to a nuance in filtering order in Tableau - if you filtered out the values, this would skew the average, and there would no longer be anything that was 140% of the average, thus your whole view would be blank. But filtering on a table calculation only really "hides" the values that don't meet the condition, so it works in this case.

1 of 1 people found this helpful