Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Not applicable

Hi i have below scenario and i want show top 10 spends in bar chart

Customer NameSpend DateSpend Amount
Customer A01/06/201611000
Customer B02/06/20162000
Customer C03/06/201613000
Customer D04/06/20164000
Customer E05/06/20165000
Customer F06/06/20166000
Customer G07/06/20167000
Customer H08/06/20168000
Customer I09/06/20169000
Customer J10/06/201610000
Customer A11/06/201611400
Customer B12/06/201612000
Customer C13/06/201613000
Customer A14/06/2016

14400

I have used below  dimension and expression

[Customer Name]

max(aggr(sum([Spend Amount]),[Spend Date])), But, if a customer repeated in top 10, it is skipping the same and displaying the next non repeated entry.

Please help me to get top 10 spend entries, even if a customer repeated in top 10.

3 Replies
Highlighted

Re: Hi i have below scenario and i want show top 10 spends in bar chart

Naveen,

Try this..

Method #1

Use Flag from inline and then take the dimension - [Customer Name]

Expression  =Sum({<Flag={1}>}[Spend Amount])


Updated:

Method #2

//=if(aggr(rank(sum([Spend Amount])),[Spend Date])<=10,[Spend Date])

Method #3

=avg(aggr(

  if(

  rank(sum([Spend Amount])) <= 10,

  sum([Spend Amount])

  ),[Spend Date])

)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Honored Contributor

Re: Hi i have below scenario and i want show top 10 spends in bar chart

Hello Naveen,

try this:

if(aggr(rank(Sum(SpentAmount)), CustomerName) <=10, CustomerName, 'Other')

i hope that helps

beck

Highlighted
Contributor

Re: Hi i have below scenario and i want show top 10 spends in bar chart

Hi Naveen,

I am suspecting that the Spend Date format should changed from Indian system to US (MM-DD-YYYY)

Then try again..

Regards,

Satya