Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear QV-uers
4 febr. i have a deadline. this is my problem
How do you use
firstsortedvalue?
i want to count my students, sorted on highstest kwalification, funded, size education and connectionnumber
I think it is possible by using firstsortedvalue, but i don't know how, because i do not understand firstsortedvalue.
Help please
Gr. Sandeep
See here for a tutorial on firstsortedvalue. I don't understand what you actually want to do. Can you post some sample data and what the results you want look like.
Hi Saha!
Sorry, but I can't understand your question. You need this in script or in a graph? Could you send the qvw?
Stel je voor:
student diploma datum
1 Niveau4 29-12-2012
1 Niveau3 14-04-2012
1 Niveau2 01-01-2012
2 NULL 10-10-2012
3 NULL 29-12-2012
3 Niveau3 29-12-2012
3 Niveau2 12-12-2012
Ik wil per jaar het aantal studenten dat gediplomeerd is delen op alle leerlingen, waarbij alleen
de hoogste diploma met worden geteld. Iedere student en diploma telt maar 1 keer mee.
student diploma date
1 Level4 29/12/2012
1 Level3 04/14/2012
1 Level2 01/01/2012
NULL 2 10.10.2012
3 NULL 12/29/2012
3 Level3 29/12/2012
3 Level2 12/12/2012
count(distinct student, where only want to count the highstest diploma achieved within that year) / count(TOTAL
student)
With your sample data you can calculate it like this:
count({<diploma-={'NULL'}>} distinct student)/count(distinct student)
If NULL is not a literal text value but a null value use this instead:
count({<diploma={'*'}>} distinct student)/count(distinct student)
If you have to get such percentages over other dimensions use the aggr function. For example aggrageted over a dimension called funded:
aggr(count({<diploma={'*'}>} distinct student)/count(distinct student), funded)
You'll get a percentage for each value of funded.
It is not quite what i mean,
I want to make this calculation:
(PEOPLE_GRADUATED * 100) / TOTAL_PEOPLE
TOTAL_PEOPLE = COUNT ALL PEOPLE
PEOPLE GRADUATED =
TYPE_ONDERWIJS = BO AND
STARTOCTOBER <= DATE_EXIT AND
DATE_EXIT < TODATE AND
(SUCCES = 1 AND X = 1) OR (LEAVVE = 1 AND Y=1)
X = COUNT PEOPLE
WHERE SUCCES = 1
STARTOCTOBER = SCHOOLSTART AND
DATE_EXIT < TODATE
// i want to use firstsortedvalue for sort by.
SORT BY
KWALIFICATION DESC
FUNDED
SIZE EDUCATION
ISNULL(DATE_EXIT, DATE_ENDPLANNED) DEC
CONNECTION NUMBER
Y = COUNT PEOPLE
WHERE EXIT = 1
STARTOCTOBER = SCHOOLSTART AND
DATE_EXIT < TODATE
// i want to use firstsortedvalue for sort by.
SORT BY
IF(SUCCES NOTNULL, KWALIFICATION, ElSE 'NIVEAU0)'
FUNDED
SIZE EDUCATION
ISNULL(DATE_EXIT, DATE_ENDPLANNED) DEC
KWALIFICATION DESC
CONNECTION NUMBER
Good luck