Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community!
Below is my output
My current problem is i need to sort the rank based on the date. Currently. The rank on 31/05 is accumulated from the rank on 30/04
Below is my current script
Load
[Factory],
[Total Complaint Received],
[Date],
if([Total Complaint Received] = 0 , 1,
if([Total Complaint Received] = Previous([Total Complaint Received]) and Previous([Date]) = [Date],
peek(Rank),
RecNo())) as Rank,
Resident MainComplaint
Order By [Date],[Total Complaint Received] ;
Can anyone help me solve this problem?
Thank you in advance!
Hi Muhammad,
Is it really a need to calculate [Rank] in the script ?
Have you tried just to delete this field from your script, and add a measure Rank like Rank(sum([Total Complaint Received]) ?
How is built your table MainComplaint ?
Regards,
Marina
Hi,
what do you actually want to rank?
It is not obvious from your script. Maybe first try to use Rank() or HRank() function in front end
Hi Marina,
Yes i have to create it in the load script because there is one requirement that i need to merge all the rank on all sheet into one final table.
Thank you for your concern!
Hi Mr. David,
I want like to rank this one
I need to rank it in the load script because different sheet will have different data and rank. There is one requirement that i need to merge all of the ranks and adding point(s) based on the rank in one final sheet.
or there is another way?
Hi,
if so than use simply Rank() function in your table. It is not necessary at all to do it in script. Or am I missunderstanding something?
Hi David,
Thank you for your concern.
I used your codes but it turned out the same.
Thanks!
Hi,
thats why I delete it (it is because of RecNo())... . From my perspective it is best to use Rank() function in your table
Hi,
I'll take your advice! thanks a lot!