Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kris1
Contributor II
Contributor II

Top N Customers in Stacked Bar chart (2 Dimensions)

Hi Team , 

I am searching in the community for the below requirement , but not getting proper solution. please help to solve this.I want 

Chart #1:- (All Case) Dim1: Period, Dim2: Customer, Measure: Sum(Sale) --- Getting Proper values 

Now my requirement i want Top3 customers of Only current Quarter like this based on user selection.

How to show Top customers  for each quarter? each quarter having different TOP 3 customers and period data is in text format form that how to find different quarters.

stacked Bar.JPG

Labels (1)
2 Replies
sasikanth
Master
Master

HI, 

Try below expression,

Dim1: Period

Dim2 : Calculated Dim : IF(aggr(rank(sum(Sales),4),Period_Revitas,Customer )<=3,Customer)

Expression : Sum(sales)

 

comm_1869405.PNG

Kris1
Contributor II
Contributor II
Author

Hi  Sasikanth

Thank You for your valuable solution. Could you please tell me the way without derived dimension. I mean i want same result using expression or using set analysis in expression.

Why because there is another bar chart without secondary dimension (Dimension 2 : Customers),but there also i need to show top 3 or Top 5 like that.

Could you plz suggest how to derive current quarter and last 3 quarters from that data. Why because the data is in text format. I am not able to apply min , max operations.