Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Top 10 in straight table Qliksense

Hi All,

Requirement is to restrict the last 10 customers based on issueddate. Need to restrict the customer data based on dates for the below table. I'm not able to restrict it in Qliksense. Kindly let me know how to proceed:

Dimensions are :

Customer ID

Customer Name

IssuedDate

Expression:

Premium

   

Customer IDCustomer NameIssuedDatePremium
1ABC8/8/2018100
2EFG8/9/2018200
3CFG8/10/2018300
4ADF8/11/20183576
5JAF8/12/20182890
6QSD8/13/20182647
7ABC8/14/20184557
8ERT8/15/20189089
9WSC8/16/2018784
10SDF8/17/20183546
11ABC8/18/20181678
12QSD8/22/20181678
13QWR8/22/2018345
14RDF8/22/2018574
15GHH8/22/2018678

Expected result from QS is to show only this 10 customers

   

Customer IDCustomer NameIssuedDatePremium
12QSD8/22/20181678
13QWR8/22/2018345
14RDF8/22/2018574
15GHH8/22/2018678
11ABC8/18/20181678
10SDF8/17/20183546
9WSC8/16/2018784
8ERT8/15/20189089
7ABC8/14/20184557
6QSD8/13/20182647

Thanks in advance,

Anupama Jagan

15 Replies
priyalvp24
Creator
Creator

Hi,

Go to Dimension.

In Limitations select Fixed Number.

Click On Top.

Enter the 10.

Thanks,

Priyal

Anonymous
Not applicable
Author

Hi Priyal,

I tried doing that but the table isn't restricted to top 10...when I scroll down it has more than 10 records..Also the limitation is based on measures right?

priyalvp24
Creator
Creator

Hi Anupama,

Untick the Show Others

agigliotti
Partner - Champion
Partner - Champion

you can use the below calculated dimension:

=Aggr( if( Rank(IssuedDate) <= 10, [Customer ID] ), [Customer ID] )

and untick "Include null values".

Anonymous
Not applicable
Author

Hi Andrea,

When I used the above calculated dimension it restricted with oldest dates. I want the last 10 customers based on issued date ( meaning it has start on the latest date)

agigliotti
Partner - Champion
Partner - Champion

let's try replacing with:

=Aggr( if( Rank(-IssuedDate) <= 10, [Customer ID] ), [Customer ID] )


OR


=Aggr( if( Rank(Max(IssuedDate)) <= 10, [Customer ID] ), [Customer ID] )


if you have more than one IssueDate for each customer ID.

priyalvp24
Creator
Creator

Hi,

Go to Dimension.

In Limitations select Fixed Number.

Click On Top.

Enter the 10.

Untick the Show Others


Test2.png

Thanks,

Priyal

Anonymous
Not applicable
Author

sorry Andrea, I had implemented this -Aggr( if( Rank(-IssuedDate) <= 10, [Customer ID] ), [Customer ID] ) before and when I took off the - sign I'm not getting any values.

agigliotti
Partner - Champion
Partner - Champion

see attached qvw document.

i hope it helps.