Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
peterderrington
Creator II
Creator 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:

averaeg.png

This is the type of thing i want to make (which is easy to do in Excel):

Untitled.png

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.

1 Solution

Accepted Solutions
Kushal_Chawda

I think it should be like below. Data table load is your actual source table load

 

Data:
LOAD Module,
type,
EpisodeNumber,
SpellNumber,
AttendDateTime,
LeftDateTime,
FirstAtt,
AdmissionMethod,
AdmitSource,
lcons,
LOS4hrs,
Outcome,
DischargeDateTime,
PrimaryDiagnosis,
PrimaryDiagA3,
PrimaryDiagDescA3,
PrimaryProcedure,
PrimaryProcA3,
PrimaryProcDescA3,
Readmitted,
[Day of the Week],
Month,
[Week Number],
Year,
[Month and Year],
[Length of Stay],
[Valid Length of Stay]

FROM
[R:\Transformation Team\Projects\Open\Abdo Pain\Data\Ambo Admissions.xlsx]
(ooxml, embedded labels);

 

New:

LOAD [ED - Attendance Number],
[ED - Arrival Date],
[ED - Arrival Time],
[ED - Departure Date],
[ED - Departure Time],
[ED - Arrival Department Wait (mins)],
[ED - Total Time in Dept],
[ED Arrival Timestamp],
[ED Departure Timestamp],
[Day of the Week],
Month,
[Week Number],
Year,
[Month and Year]
FROM
[R:\Transformation Team\Projects\Open\Abdo Pain\Data\ED to Ambo Patients.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

Sequence:
Load distinct [Month and Year],
ceil(autonumber([Month and Year])/12) as Seq
Resident Data;

View solution in original post

35 Replies
Kushal_Chawda

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

peterderrington
Creator II
Creator II
Author

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:

test.png

With Jan 19 being the start of the new phase.

qliksus
Specialist II
Specialist II

Something like the below 

 

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

peterderrington
Creator II
Creator II
Author

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:

Count({<AdmitSource={'A&E'}>}AdmitSource)

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: 

Median(TOTAL AGGR (Count({<AdmitSource={'A&E'}>}AdmitSource),[Month and Year]))

 

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

Kushal_Chawda

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

peterderrington
Creator II
Creator II
Author

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

Kushal_Chawda

try this expression

Median(TOTAL <Month> AGGR (Count({<AdmitSource={'A&E'}>}AdmitSource),[Month and Year]))

peterderrington
Creator II
Creator II
Author

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?

johnmackintosh
Contributor III
Contributor III

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