Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
meitargold
Contributor III
Contributor III

Ranking in Script

Hi,

I need help with this Rank situation (Aggr with Dimensions) and it must be made on Script (Not in set analysis).

Situation:

PlatformSiteValue
MobileEN100
MobileIL300
MobileDE150
PCEN200
PCIL400
PCDE600
CryptoEN400
CryptoIL300
CryptoDE

100

Wanted Result:

 

PlatformSiteValueRank
MobileEN1003
MobileIL3001
MobileDE1502
PCEN2003
PCIL4002
PCDE6001
CryptoEN4001
CryptoIL3002
CryptoDE1003
1 Solution

Accepted Solutions
sunny_talwar

Change them like this and see if it works

AutoNumber(Weeklypageviews, Product&domain_ID&1) AS Weeklypageviews_Rank

AutoNumber(Weeklyvisits, Product&domain_ID&2) AS Weeklyvisits_Rank

AutoNumber(Weeklyvisitors, Product&domain_ID&3) AS Weeklyvisitors_Rank

View solution in original post

12 Replies
tresesco
MVP
MVP

Try like:

T1:

Load * Inline [

Platform, Site, Value

Mobile, EN, 100

Mobile, IL, 300

Mobile, DE, 150

PC, EN, 200

PC, IL, 400

PC, DE, 600

Crypto, EN, 400

Crypto, IL, 300

Crypto, DE, 100];


Join


Load

  Platform, Site,

    AutoNumber( Rowno(), Platform) as Rank

Resident T1 Order By Value;

Capture.JPG

tamilarasu
Champion
Champion

Hi Meitar,

Data:

LOAD * INLINE [

    Platform, Site, Value

    Mobile, EN, 100

    Mobile, IL, 300

    Mobile, DE, 150

    PC, EN, 200

    PC, IL, 400

    PC, DE, 600

    Crypto, EN, 400

    Crypto, IL, 300

    Crypto, DE, 100

];

Result:

Load *,

AutoNumber(Value, Platform) as Rank

Resident Data

Order By Platform, Value desc;

DROP Table Data;

chinnuchinni
Creator III
Creator III

try this:

Situation:


load * Inline [

Platform, Site, Value

Mobile, EN, 100

Mobile, IL, 300

Mobile, DE, 150

PC, EN, 200

PC, IL, 400

PC, DE, 600

Crypto, EN, 400

Crypto, IL, 300

Crypto, DE, 100


];


abc:

load Site, sum(Value)as Valuee1 Resident Situation Group by Site;




load Site,Valuee1,RowNo() as rank Resident abc Order by Valuee1 desc;


DROP Table abc;

meitargold
Contributor III
Contributor III
Author

It's correct for 1 Measure (Value).

When I'm trying to this on more than one measure I don't succeed- Only for the first Measure

(As I read it because of AutoNumber function).

Any solution for that?

sunny_talwar

Would you be able to elaborate on your concern?

meitargold
Contributor III
Contributor III
Author

autonumber.png

meitargold
Contributor III
Contributor III
Author

As I Read maybe it's because of Autonumber (Need to reset it somehow)

sunny_talwar

Change them like this and see if it works

AutoNumber(Weeklypageviews, Product&domain_ID&1) AS Weeklypageviews_Rank

AutoNumber(Weeklyvisits, Product&domain_ID&2) AS Weeklyvisits_Rank

AutoNumber(Weeklyvisitors, Product&domain_ID&3) AS Weeklyvisitors_Rank

sasiparupudi1
Master III
Master III

Complete your joins first into a temp table

and try autounumber on the final table

hth

Sasi