Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumart
Partner - Contributor III
Partner - Contributor III

Top10 customers in each zone where customer is not added as dimension in Table

Dynamically how to send the top 10 customers (By sales) in expression panel so will get the  sales of oly top 10 customers at each Zone. without selecting any zone..


BY this expression

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

I am getting top10 customers at overall and based on selection.


Example: when I select North then top 10 Cust in the north are sending to expression, and when i remove selection then top 10 cust at an overall level is sending to Expression.

Added in table Year, Year Quarter , Zone, other expressions as well.

May be with the Aggr() with Rank we will get.

16 Replies
rajkumart
Partner - Contributor III
Partner - Contributor III
Author

Dimension is not added in the table

rajkumart
Partner - Contributor III
Partner - Contributor III
Author

Hi, this is giving top 10 customers at the overall zone level, But I wanted to pass the top10 customers at each zone.

Anonymous
Not applicable

Hi,

Could you tell the datatype of customer field and where it has been generated.

sunny_talwar

Try this in that case

Sum(Aggr(If(Rank(Sum(Sales)) < 11, Sales), Zone, Customer))

rajkumart
Partner - Contributor III
Partner - Contributor III
Author

No Sunny, I  am getting vales '0'(Zero)

sunny_talwar

Would you be able to share a sample where you are trying to do this?

ogautier62
Specialist II
Specialist II

I apologize for my wrong first response ,

If I'he well understood may be something like this :

dummy personnal example :

top 2  item for supplier selected :

if no selection top 2 total item

is it your request ?

expression is :

if(GetSelectedCount(Fournisseur) > 0 ,

       if(rank(aggr(nodistinct sum({1} Montant),Fournisseur,Article),4) <=2,  sum(Montant)),

     if(rank(aggr(nodistinct sum(Montant),Article),4) <=2,

sum(Montant)) )

regards