# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Contributor II

## Plotting a change in an average in a Run Chart

Hi,

I have a Run Chart that shows activity over a period of months, i have been able to plot a Median Average on the graph however i need to be able to show a change in activity on the graph which would then alter the Median average 'mid run'.

This is the current graph: This is the type of thing i want to make (which is easy to do in Excel): Does anybody have any idea how to achieve this in QlikView? I can't believe i can do it in Excel but not QlikView, i'm clearly missing something obvious.

Thanks.

28 Replies MVP

## Re: Plotting a change in an average in a Run Chart

How would you alter the median? Would you be able to share the sample data?

Contributor II

## Re: Plotting a change in an average in a Run Chart

So the median would change from a specific date. The idea is to show what improvement (or decline) has occurred since the implementation of a new service.

The Excel data looks similar to this: With Jan 19 being the start of the new phase.

Valued Contributor II

## Re: Plotting a change in an average in a Run Chart

Something like the below

Median( Total<Month>  aggr( sum(Value) , Month))

Contributor II

## Re: Plotting a change in an average in a Run Chart

ok....

I think I might need a little bit more advice.

I have [Month and Year] as the dimension (which displays like Jul 18, Aug 18, etc) and then the current expression is showing as:

as I want to pick out the specific A&E visits first (there are three types and I will repeat with all three) with the Median average being calculated by this expression:

How would I alter your example to replicate what i'm after? MVP

## Re: Plotting a change in an average in a Run Chart

Hi, If you already have median available in data, how about just creating expression sum(median) in chart?

Contributor II

## Re: Plotting a change in an average in a Run Chart

But how would that recalculate the median line at the point of change? MVP

## Re: Plotting a change in an average in a Run Chart

try this expression

Contributor II

## Re: Plotting a change in an average in a Run Chart

If I put that in as typed then I just get the exact same median line as the one I already have. Where would I put in the identifier of the point of change (in this instance July 19).

Is it possible, once we've worked out how to do this to be able to add an additional change point?

New Contributor III

## Re: Plotting a change in an average in a Run Chart

Hi Peter

I'm assuming that you want to change the median when a signal occurs.

Typically, that signal is a run of 9 consecutive points on the desired side of the median line.

This run chart analysis is actually pretty tricky, so you're probably going to want to only have one measure  per chart .

( 3 measures, with 3 unique medians,  is going to be really confusing visually)

Do you have a flag column to compare if the current value is higher / lower than the current median?

John