Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Autogenerate

Hi,

I have a table which is sort by descending order. I want to autogenerate the Ranking in the load script. For example  i have a master calendar table as

Month

Dec 12

Nov  12

Jul 12

Jun 12

May 12

Apr 12

Mar 12

Feb 12

Jan 12

 

And i want the additional column with ranking

Month   Rank

Dec 12    1

Nov  12    2

Jul 12      3

Jun 12     4

May 12    5

Apr 12     6

Mar 12     7

Feb 12     8

Jan 12     9.

During every reload it should reset and starts with 1. RowNo and RecNo is not working.

1 Solution

Accepted Solutions
kamalqlik
Partner
Partner

Hi ,

PFA Application.

In case you want something else please let me know.

Regards

Kamal Naithani

View solution in original post

3 Replies
nagaiank
Specialist III
Specialist III

If you use the following script in loading data and sort the field [Month] using the sort expression [Month1] descending, you will be able to sort the data as needed by you.

LOAD *,Month(Date(Date#(Month,'MMM YY'),'MM/DD/YYYY')) as Month1;

LOAD * Inline [

Month

Dec 12

Nov 12

Jul 12

Jun 12

May 12

Apr 12

Mar 12

Feb 12

Jan 12

];

A sample application is attached.

brindlogcool
Creator III
Creator III
Author

Hi

Thanks for your response i am able to sort but i want the Ranking to be autogenerated as an additional column. 

kamalqlik
Partner
Partner

Hi ,

PFA Application.

In case you want something else please let me know.

Regards

Kamal Naithani

View solution in original post