Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
seahyanzheng
Contributor III
Contributor III

Ranking Issue

Hi,

When i run the following codes separately (commented the other) it works fine. However, when running together, the latter has issue:

Performance_Met3:
Load
*,
AutoNumber([Sales %] , [Sales Month]) as [Month Rank]
Resident
Performance_Met2
order by [Sales Month], [Sales %] desc;

LEFT JOIN
LOAD
Distinct
[Sales Month],
[Sales %] as [Sales % 1st]
Resident
Performance_Met3
where [Month Rank] = 1;

-------------------------------------------------------

Performance_Met4:
Load
*,
AutoNumber(RM_ACCEPT_CNT, [Sales Month]) as [Month Rank Accept]
Resident
Performance_Met2
order by [Sales Month], [RM_ACCEPT_CNT] desc
;

LEFT JOIN
LOAD
Distinct
[Sales Month],
[RM_ACCEPT_CNT] as [RM_ACCEPT_CNT 1st]
Resident
Performance_Met4
where [Month Rank Accept] = 1;

May i ask what the issue? Need to have two ranking system..

4 Replies
Or
MVP
MVP

Very hard to guess what the issue is, since you didn't tell us what's actually going wrong...

Taking a stab at it, try NOCONCATENATE LOAD for the second (Performance_Met4) load. Looks like the fields are identical and that'll get them automatically concatenated.

seahyanzheng
Contributor III
Contributor III
Author

Thanks for the reply!

Sorry, the latter - take for example Rank 2 goes to Rank 69.. 

I did try noconcatenate load though, however the results remain the same. However, once Performance_Met3 is commented, it went back to 2 again..

Or
MVP
MVP

So your issue is that the results you're getting don't match what you expect, rather than something technical/error related. That narrows it down somewhat. However, in order to try and troubleshoot the results, you'd likely have to attach a sample file containing data, the current results, and an explanation of what the expected results are.

seahyanzheng
Contributor III
Contributor III
Author

I tried with sample data and it worked perfectly.. oh well