Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi ,
PFA Application.
In case you want something else please let me know.
Regards
Kamal Naithani
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.
Hi
Thanks for your response i am able to sort but i want the Ranking to be autogenerated as an additional column.
Hi ,
PFA Application.
In case you want something else please let me know.
Regards
Kamal Naithani