Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

SPC Chart - on median value

Hello

I am trying to build an SPC chart on the median value by week

But I do not know the best approach on how to build my chart

1) As I need to find my median shall I write this in the edit script as follows:

This creates an error in the expression

How would I write the UPPER CONTROL LIMIT based on the fact that a median needs to be calculated by week?

Any suggestions?

Kind Regards

Helen

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Hi.

To calculate your average value by week dimension (for upper control limit) you could use aggr() function:

Avg(aggr(IF([Patient Admitted?] = 1, [Total Wait])/1440), [WeekDimension]))

It calculates your if() expression for each [WeekDimension] value, then avg() aggregates these values.

For stdev() use the same approach.

View solution in original post

2 Replies
whiteline
Master II
Master II

Hi.

To calculate your average value by week dimension (for upper control limit) you could use aggr() function:

Avg(aggr(IF([Patient Admitted?] = 1, [Total Wait])/1440), [WeekDimension]))

It calculates your if() expression for each [WeekDimension] value, then avg() aggregates these values.

For stdev() use the same approach.

helen_pip
Creator III
Creator III
Author

Hello

Thank you for your help

Much appreciated.  This works a treat

Thanks

Helen