11 Replies Latest reply on Jun 20, 2018 12:39 AM by David Maning

# Monitor for 20% increase in a week

Hello!

I have a table with a bunch of time stamped tasks and the memory they used, and I would like to monitor for jumps in memory usage over 20%. I would like to be able to calculate the biggest 'jump' in memory use over each week. Ideally, my formula would be along the lines of

(highest data point in week)/(lowest data point in week)

Actually what I am looking for is: (highest-lowest)/(average)

For this I initially considered the following formula:

WINDOW_MAX([Memory Used],...)/WINDOW_MIN([Memory Used],...)

But because my data is not uniformly distributed, I cannot assume to know how many other data points will be included in the same week. I am also thinking it would be nice if my function were able to do this not only for a week, but for any time unit of my choosing. How might I go about this?

Another important thing is that I need to be able to do this on a filtered field, because I need to compare between different elements.

Thank you!

• ###### 1. Re: Monitor for 20% increase in a week

HI Hortense

Thanks,

Shin

• ###### 2. Re: Monitor for 20% increase in a week

Thank you for your reply! I have attached a small sample of it in the main message.

Best,

Hortense

• ###### 3. Re: Monitor for 20% increase in a week

Hi Hortense!

I suggest you to use LOD.

Pls find example below and attached.

1) > 20% control per week

IF

MIN({ FIXED [Order Date]:SUM([Sales])})

/

MIN({ FIXED DATETRUNC('week', [Order Date]): SUM([Sales])}) > 0.2

THEN MIN({ FIXED [Order Date]:SUM([Sales])})

END

2) highest / lowest data point per week

{ FIXED DATETRUNC('week', [Order Date]): MAX({ FIXED [Order Date]:SUM([Sales])})}

/

{ FIXED DATETRUNC('week', [Order Date]): MIN({ FIXED [Order Date]:SUM([Sales])})}

Done.

Trust this helps.

D

1 of 1 people found this helpful
• ###### 4. Re: Monitor for 20% increase in a week

Thank you! That's exactly what I needed.

Best,

Hortense

• ###### 5. Re: Monitor for 20% increase in a week

HI Hortense

Hope this helps.

First of all, you need to convert the string value to number format.

Simple "VIew" is using box plot?

You an change the time duration to week, but sample does not have enough plots on week I think.

And adding max / min to 2nd axis.

Thanks,

Shin

1 of 1 people found this helpful
• ###### 6. Re: Monitor for 20% increase in a week

Hi all,

Actually, both of the solutions here have the same issue: they show the same data even when filtered. Is there an solution to this?

best,

Hortense

• ###### 7. Re: Monitor for 20% increase in a week

Change filter to context.

## Filters and Level of Detail Expressions

There are several different kinds of filters in Tableau and they get executed in the following order from top to bottom.

Shin

• ###### 8. Re: Monitor for 20% increase in a week

Ah, sorry! I'm not explaining myself correctly. It's not filtering that I'm trying to do, but have a different curve for different types of tasks. Right now, when I split my task category into different subcategories, they all have the same line using that formula, even though I know there memory usage evolves differently across time.

Thanks,

Hortense

• ###### 9. Re: Monitor for 20% increase in a week

Please attach new workbook with right st of data.

or

Shin

• ###### 10. Re: Monitor for 20% increase in a week

In order to apply corresponding filters you should just insert any dimension that you want to filter into the LOD expression.

MIN({ FIXED [Order Date], [Any additional Dimension]:SUM([Sales])})

Trust this helps.

D

• ###### 11. Re: Monitor for 20% increase in a week

Hi Hortense,

Would you be so kind yo close this thread in order to help other users in searching solution for the related issues.

Pls mark Shin's or mine answer as correct.

Thanks

D