Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ID | Customer Name | IssuedDate | Premium |
1 | ABC | 8/8/2018 | 100 |
2 | EFG | 8/9/2018 | 200 |
3 | CFG | 8/10/2018 | 300 |
4 | ADF | 8/11/2018 | 3576 |
5 | JAF | 8/12/2018 | 2890 |
6 | QSD | 8/13/2018 | 2647 |
7 | ABC | 8/14/2018 | 4557 |
8 | ERT | 8/15/2018 | 9089 |
9 | WSC | 8/16/2018 | 784 |
10 | SDF | 8/17/2018 | 3546 |
11 | ABC | 8/18/2018 | 1678 |
12 | QSD | 8/22/2018 | 1678 |
13 | QWR | 8/22/2018 | 345 |
14 | RDF | 8/22/2018 | 574 |
15 | GHH | 8/22/2018 | 678 |
Expected result from QS is to show only this 10 customers
Customer ID | Customer Name | IssuedDate | Premium |
12 | QSD | 8/22/2018 | 1678 |
13 | QWR | 8/22/2018 | 345 |
14 | RDF | 8/22/2018 | 574 |
15 | GHH | 8/22/2018 | 678 |
11 | ABC | 8/18/2018 | 1678 |
10 | SDF | 8/17/2018 | 3546 |
9 | WSC | 8/16/2018 | 784 |
8 | ERT | 8/15/2018 | 9089 |
7 | ABC | 8/14/2018 | 4557 |
6 | QSD | 8/13/2018 | 2647 |
Thanks in advance,
Anupama Jagan
Hi,
Go to Dimension.
In Limitations select Fixed Number.
Click On Top.
Enter the 10.
Thanks,
Priyal
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?
Hi Anupama,
Untick the Show Others
you can use the below calculated dimension:
=Aggr( if( Rank(IssuedDate) <= 10, [Customer ID] ), [Customer ID] )
and untick "Include null values".
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)
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.
Hi,
Go to Dimension.
In Limitations select Fixed Number.
Click On Top.
Enter the 10.
Untick the Show Others
Thanks,
Priyal
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.
see attached qvw document.
i hope it helps.