Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Qlik Community
- :
- Forums
- :
- Analytics
- :
- New to Qlik Sense
- :
- Sum of rank

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Not applicable

2017-04-03
03:15 PM

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

Sum of rank

Hello everyone,

I use rank function to obtain a top 5 of my exportation. Then I want sum total exportation of this top 5 but i don't have sucess. Indeed, in each of my table, I obtain only total of product but I want total of exportation of TOP 5.

Do you have any idea to help me ?

Thanks in advance !

Best regards,

Salim

950 Views

1 Solution

Accepted Solutions

OmarBenSalem

MVP

2017-04-03
04:00 PM

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

9 Replies

OmarBenSalem

MVP

2017-04-03
03:20 PM

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

Can you post an image of what you have?

your measure?

And what you want to calculate and where?

Or even better, can you put your sample qvf file to work with?

Thanks

796 Views

Not applicable

2017-04-03
03:23 PM

Author

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

I use this formula, but she return nothing :

Aggr(Sum({<nom_Mesure={exp}>} valeur),

if(rank(if(((sum({<nom_Mesure={exp}>} valeur)/sum({<nom_Mesure={exp}>}total<nom_Du_Pays> valeur))*100)<=1,

((sum({<nom_Mesure={exp}>} valeur)/sum({<nom_Mesure={exp}>}total<nom_Du_Pays> valeur))*100)))<=5,

code_Produit))

796 Views

OmarBenSalem

MVP

2017-04-03
03:31 PM

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

Can you please attach your QVF file Salim?

A sample one? only containing this table to work with?

And explain exactly what do you want to do?

Is it something like this?

First table: Customers and their sales

second table, only customers having the top 5 sales and the total of the top 5 :

796 Views

Not applicable

2017-04-03
03:38 PM

Author

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

It's the windows named "one" and the measure named "Exp/pop" of the table. Before, my formula calculated total exportation of one country in relation with population of this country. But now, I want calculate only the value total of the export of the top 5 for one country.

796 Views

Not applicable

2017-04-03
03:43 PM

Author

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

Yes, I want this but I want total in each line.

796 Views

Not applicable

2017-04-03
03:59 PM

Author

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

Thanks for you sample, I success but do you know if I can put this formula in variable ?

Sum(total Aggr(if(rank(if(((sum({<nom_Mesure={exp}>} valeur)/sum({<nom_Mesure={exp}>}total<nom_Du_Pays> valeur))*100)<=1,

((sum({<nom_Mesure={exp}>} valeur)/sum({<nom_Mesure={exp}>}total<nom_Du_Pays> valeur))*100)))<=5,

sum({<nom_Mesure={exp}>} valeur)), code_Produit))

Thanks again

796 Views

OmarBenSalem

MVP

2017-04-03
04:00 PM

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

OmarBenSalem

MVP

2017-04-03
04:41 PM

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

Salim,

If you want to see the top 5 exporting products by country; why don't you just create a pivot table: with :

dimension 1 : country

dimension 2 : produit (and limit it to the 5 first)

measure: Sum({<, nom_Mesure={exp}>}valeur)

796 Views

Not applicable

2017-04-04
04:19 AM

Author

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

I do it this in first, but my problem it's I wished the Top N values of exp inferior(or superior) at X%. So it's not working fine like with rank function.

796 Views

Community Browser