6 Replies Latest reply on Apr 25, 2017 6:47 AM by Zhouyi Zhang

# How to calculate max difference between the curves at each point?

Could you help me to calculate max difference between the curves at each point as a separte row/field and also calculate standard deviation for this new field?

• ###### 1. Re: How to calculate max difference between the curves at each point?

Hi, Karolina

I think you can create a measure as below code and put it to Rows next to the avg runrate

WINDOW_MAX( AVG([Runrate])) - WINDOW_MIN(AVG([Runrate]))

here is my snapshot. Hope this could help

ZZ

1 of 1 people found this helpful
• ###### 2. Re: How to calculate max difference between the curves at each point?

Thank you so much! How did you calculate the standard deviation?

• ###### 3. Re: How to calculate max difference between the curves at each point?

Hi, Karolina

adding standard deviation is just the same way adding the reference line.

Right click the axis and select add reference line and then set parameter for standard deviation, i.e 1,or 2

Hope this could help.

ZZ

1 of 1 people found this helpful
• ###### 4. Re: How to calculate max difference between the curves at each point?

Thank you so much!

• ###### 5. Re: How to calculate max difference between the curves at each point?

Thank you so much! But can I calculate difference between curves at each point ? Here I see the same value for each point on the X axis,

Each curve it is avg run rate for specific month. If I choose 2 months (e.g. April, March) I can see 2 curves.

At each point one of the curves has max and one of the curves has min.

Can I calculate this difference between max and min among curves at each point.

The formula WINDOW_MAX( AVG([Runrate])) - WINDOW_MIN(AVG([Runrate]))

doesn't work

• ###### 6. Re: How to calculate max difference between the curves at each point?

Hi, Karolina

I wish I could understand your requirement correctly. If the formula is not working as your expectation, I guess it may be related to table calculation. Here I changed the table calculation as below snapshot, and then the dots became more distributive. Not sure if this is what you need because I am not quite sure what the point of each curve means, does it mean the "Percent In Working Days" , if yes, not every point has same number of curve, is that right?

May be you can have a try first and if it is still not what you need, please let me know.

ZZ