Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Users, make your voice heard! Participate in Wisdom of Crowds® Market Study: Start Survey
cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumart
Partner
Partner

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
ritesh_kodolikar

Hi,

I think there is no need of Rank() instead we can achieve this using Dimensions Limits.

PFA Sample

Regards

Ritesh

ogautier62
Specialist II
Specialist II

Hi

with function FieldSortedValue :

in a set analysis like :

  Customer = {"=FieldSortedValue(Customer, -aggr(sum(sales), Zone)<=10"}

regards

rajkumart
Partner
Partner

Thanks for the quick Response Olivier,

Checked by your hint but still not getting a result.

*FieldSortedValue

*FirstSortedValue

ogautier62
Specialist II
Specialist II

sorry FirstSortedValue yes !

could you attach some data please for build exact expression

sunny_talwar

May be this

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

balabhaskarqlik

May be this:

Using Set Analysis

Dimension = Zone

Expression = SUM({<Customer = {"=Rank(SUM(Sales),4)<=10"}>}Sales)

balabhaskarqlik

Use Calculated Dimension

=IF(Aggr(Rank(SUM(Sales),4),Customer)<=10,Customer)

or

=IF(Aggr(Rank(SUM(Sales),4),Zone)<=10,Zone)

Tick Suppress When Value is NULL

Expression = SUM(Sales)

rajkumart
Partner
Partner

Partially Correct but wanted to get top10 customers at each zone. that I could not able to get the above expression.

rajkumart
Partner
Partner

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.