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: 
krishna20
Specialist II
Specialist II

Top 20 in pivot table

Hi Friends,

I'm having an issue in showing the top 20 customers in pivot table.I'm using the below Expression at calculated dimension.

The chart is showing empty.i don't know where i'm going wrong.

=if(aggr(rank(sum(TP_GrossPremium_LC_1)),if(CUST_CATG='02',CUST_NAME))<=20,if(CUST_CATG='02',CUST_NAME))

Regards

Krishna

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

why you have used if statement ?

if it is for excluding something from sum

the it should be like

=if(aggr(rank(sum(if(CUST_CATG='02',TP_GrossPremium_LC_1))),[CUST_NAME)<=20,[CUST_NAME]))

// [CUST_NAME] is your group by column.

if you are looking for something else then clear your requirement.

Thanks

BKC

View solution in original post

2 Replies
PrashantSangle

Hi,

try like

if(CUST_CATG='02',aggr(rank(sum(TP_GrossPremium_LC_1)),CUST_NAME)<=20,CUST_NAME))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable

Hi,

why you have used if statement ?

if it is for excluding something from sum

the it should be like

=if(aggr(rank(sum(if(CUST_CATG='02',TP_GrossPremium_LC_1))),[CUST_NAME)<=20,[CUST_NAME]))

// [CUST_NAME] is your group by column.

if you are looking for something else then clear your requirement.

Thanks

BKC