Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jagdishbr
Contributor III
Contributor III

Rank in Load script

Hi,

I'm new qlik and working on project.

The requirement is to bring rank and band on load sript rather than table.

Sales_Rank = Aggr(Rank(Sum(Sales), 4,1), [Region], Product, Period, [ID])

IF([Sales_Rank] < 26, 'Top 25',
IF ([Sales_Rank] < 51, '26-50',
IF ([Sales_Rank] < 101, '51-100',
IF ([Sales_Rank] < 201, '101-200', '200+'))))

the above expression giving the correct output with respect to Rank and bucket. but, want to learn to write in load script. below script for reference.

please help.

 

LOAD

[ID],
[ClientName],
[Client Type],
[Region HQ],
[Country HQ],
[Region],
Product,
Period,
Sales,
Revenue,
SoW,
Comments,
Status,
GMAssetClass,
TIER_NAME
FROM
[CData.csv]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq);

Labels (1)
0 Replies