
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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 |
Wanted Result:
Platform | Site | Value | Rank |
Mobile | EN | 100 | 3 |
Mobile | IL | 300 | 1 |
Mobile | DE | 150 | 2 |
PC | EN | 200 | 3 |
PC | IL | 400 | 2 |
PC | DE | 600 | 1 |
Crypto | EN | 400 | 1 |
Crypto | IL | 300 | 2 |
Crypto | DE | 100 | 3 |
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you be able to elaborate on your concern?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I Read maybe it's because of Autonumber (Need to reset it somehow)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Complete your joins first into a temp table
and try autounumber on the final table
hth
Sasi

- « Previous Replies
-
- 1
- 2
- Next Replies »