Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey friends,
I have a requirement wherein i need to Load top 1 record per category.
| StudentID | Name | Marks | YearMonth | 
|---|---|---|---|
| 1 | Girish | 60 | 201306 | 
| 1 | Girish | 70 | 201307 | 
| 1 | Girish | 80 | 201308 | 
| 1 | Girish | 90 | 201309 | 
| 2 | Raj | 65 | 201306 | 
| 2 | Raj | 75 | 201307 | 
| 3 | Ajay | 55 | 201308 | 
| 3 | Ajay | 75 | 201309 | 
Expected Output:
| StudentID | Name | Marks | YearMonth | 
|---|---|---|---|
| 1 | Girish | 90 | 201309 | 
| 2 | Raj | 75 | 201307 | 
| 3 | Ajay | 75 | 201309 | 
I want 1 records per max of YearMonth
Sorry guys i am new to Qlikview Tech.
I had tried doing:-
Abc:
Load First 1 *
from excelfile;
But it doesn't worked i want 1 row for each StudentID.
Could anyone pls assist me.. on this....
Thanks & Regards,
Girish Chhatani
Try this:
LOAD *
FROM excelfile;
inner join
LOAD StudentID,
max(YearMonth) as YearMonth
FROM excelfile group by StudentID;
Gio
Try this:
LOAD *
FROM excelfile;
inner join
LOAD StudentID,
max(YearMonth) as YearMonth
FROM excelfile group by StudentID;
Gio