Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Rank in text object

Hi all,

I am new to Qlikview and I have a requirement like, i want to show particular product rank for each  country.

Ex:

Country   Product   Sales

US          P1              10

US         P2              20

US        P3              30

US         P4              40

UK         P1              100

UK          P2               800

UK        P3              400

UK         P4               400

O/P :

In Text Object:   US - 2 nd RANK for  Product(P2)

                         UK- 1st  RANK for   Product(P2)

Thanks and Regards,

Naresh

16 Replies
nareshthavidishetty
Creator III
Creator III
Author

Hi,

I need the rank of particular product for country,

My requirement is,

i have a different products in that for product 'P2 'compare with other products for country=US

As posted  above, i want to see the rank of product 'P2 'for country US, Like

product 'P2' rank in US is 2. So i want to show 2 in text object.

antoniotiman
Master III
Master III

Try

='For US Rank is = '&Max({<COUNTRY={'US'}>} Aggr(Rank(TOTAL Sum({<PRODUCT={'P2'},COUNTRY=>} SALES),4),COUNTRY))

See Attachment

sunny_talwar

What exactly is your intent here? Are you looking for Rank based on selection made in Country or Product? How many text boxes are you looking to get? Can you may be provide some details which can guide one of us to what exactly might you be looking for?

Best,

Sunny

nareshthavidishetty
Creator III
Creator III
Author

Hi Sunny sorry for delay in reply,

I have a country wise different products ,My requirement is i want to compare Product 'P2' sales with competitor  products for particular country and it's Rank.

Like that i want to show the rank of product 'P2' for different countries as well in text objects..

eg:

Country   Product   Sales

US          P1              10

US         P2              20

US        P3              30

US         P4              40

UK         P1              100

UK          P2               800

UK        P3              400

UK         P4               400

in text object i want to show like for Product 'P2' is:

US:Rank-2

UK: Rank -1

Thanks,

Naresh

tyagishaila
Specialist
Specialist

For US write in Text Object

=Aggr(Rank(Sum({<Country={'US'},Product=>}Sales)),Country,Product)

For UK:

=Aggr(Rank(Sum({<Country={'UK'},Product=>}Sales)),Country,Product)


You can get RANK for different products

nareshthavidishetty
Creator III
Creator III
Author

Hi tyagishaila,

Thanks of your reply,

I want to select product as well,

=Aggr(Rank(Sum({<Country={'US'},Product={'P2'}>}Sales)),Country,Product)


when i am including Product ={'P2'} the value is coming 1,but required result is 2.


susovan
Partner - Specialist
Partner - Specialist

Try this expression,

Aggr(Rank(Sum({<Product=>} Sales)),Product)

Warm Regards,
Susovan