Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am a bit of a newby to Qlikview and think I have biten off more than I can chew.
I have a table
Department | Student | Enrolled | Course | retained |
---|---|---|---|---|
Dept1 | STU1 | 1 | Course 1 | 1 |
Dept2 | STU2 | 1 | Course 2 | 0 |
Dept1 | STU3 | 1 | Course 1 | 0 |
Dept1 | STU4 | 1 | Course 3 | 1 |
Dept3 | STU5 | 1 | Course 4 | 1 |
etc, etc
where 1 = retained and 0 - not retained
what I want to do is create create buckets of the % retained for each course ie =Sum (retained)/Sum (Enrolled)
so I had say, 1 bucket for courses retaining over 50%, over 75% and 0ver 90%
Everything I have tried so far has failed spectacularly, so won't embarrass myself by showing my workings. I have looked through some previous discussions and can see how to create a bucet in the load script but cant figure out how to populate it with calculations
any help anyone could provide would be hugely appreciated
thanks
For info
So far I have created the following table
RetentionGp:
load * INLINE
[RetNR, RetainedGP
1, <60
2, 60-69
3, 70-79
4, 80-89
5, 90+
];
then loaded the main data table
then created the following resident load
retainedPercents:
LOAD
Course,
Sum (retained)/Sum ([Enrolled]) AS PecentRetained
RESIDENT BaseData
Group by [Course];
now I want to put my courses into buckets based on % retained using
retainedBucket:
load [Course code],
PecentRetained,
if(PecentRetained<=59,1,
(if(PecentRetained<=69,2,
(if(PecentRetained<=79,3,
(if(PecentRetained<=89,4,5)))))))as RetNR
From retainedPercents
this is where I am coming unstuck (system error -
The system cannot find the file specified.)
which is understandable but i can't think how I can reference a 'resident load' table
I also feel i am making this this a bit more long winded than need be
again, any help would be most appreciated (and maybe in about 10 years I can start to return the favour)