Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Luc-HvA
Contributor
Contributor

limit the table to a maximum of 10 to make a top 10 of suppliers

I need to show a top 10 of suppliers from a data base, but i can't adjust the table. is this possible?

2 Solutions

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

I am going to share with you a solution that resolves similar issue, however you might have to modify it according to your data, expressions and needs.

 

In my case I have the following dataset: 

Suppliers from A to O with random products values.

SCREENSHOT

 

You can use the following Data load editor script for tests:

load * inline [
Suppliers, Products
SupplierA, 10
SupplierB, 20
SupplierC, 100
SupplierD, 1
SupplierE, 500
SupplierF, 50
SupplierG, 25
SupplierH, 35
SupplierI, 56
SupplierJ, 132
SupplierK, 20
SupplierL, 10
SupplierM, 50
SupplierN, 450
SupplierO, 300
];

 

Now I want to create another table where I will only show the top 10 suppliers:

1. Create a new table and add Suppliers as Dimension

2. Add Measure and as expression use "=Sum(Products)"

3. This will create a table similar to the one that we already have.

4. Go to the Data > Suppliers dimension and under limitation choose "Fixed number"

5. Choose "Top" and for the value use 10

6. Un-check the option "Show others"

 

This will give you the following Table:

SCREENSHOT

As you can see it only shows you the top 10 Suppliers based on the Product field.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

anat
Master
Master

 

or else you can use Rank function in set analysis

=Sum({<Customer = {"=Rank(Sum(Sales))<=10"}>} Sales)

View solution in original post

2 Replies
Andrei_Cusnir
Specialist
Specialist

Hello,

 

I am going to share with you a solution that resolves similar issue, however you might have to modify it according to your data, expressions and needs.

 

In my case I have the following dataset: 

Suppliers from A to O with random products values.

SCREENSHOT

 

You can use the following Data load editor script for tests:

load * inline [
Suppliers, Products
SupplierA, 10
SupplierB, 20
SupplierC, 100
SupplierD, 1
SupplierE, 500
SupplierF, 50
SupplierG, 25
SupplierH, 35
SupplierI, 56
SupplierJ, 132
SupplierK, 20
SupplierL, 10
SupplierM, 50
SupplierN, 450
SupplierO, 300
];

 

Now I want to create another table where I will only show the top 10 suppliers:

1. Create a new table and add Suppliers as Dimension

2. Add Measure and as expression use "=Sum(Products)"

3. This will create a table similar to the one that we already have.

4. Go to the Data > Suppliers dimension and under limitation choose "Fixed number"

5. Choose "Top" and for the value use 10

6. Un-check the option "Show others"

 

This will give you the following Table:

SCREENSHOT

As you can see it only shows you the top 10 Suppliers based on the Product field.

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
anat
Master
Master

 

or else you can use Rank function in set analysis

=Sum({<Customer = {"=Rank(Sum(Sales))<=10"}>} Sales)