Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help

I want to filter out top five and bottom five sales ,

on a chart ,i want to impliment it with suing button,

pls provide suggestion how to create button which filter to five as well as below five.

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

Let try

Step1: Load data

[Data]:

LOAD * INLINE [

No,Product,Sale

1,P1,10

2,P2,15

3,P3,5

5,P4,25

6,P6,12

7,P7,9

8,P8,7

9,P9,17

10,P10,11]

Step2: Create variable by Goto Settings ==> Variable Overview ==> Add ==> Give variable name <vShow>

Step3: Create Button <Top 5> with action <Set Variable>

    . Variable : vShow

    . Value : SUM(IF(AGGR(RANK(Sale),Product)<=5,Sale))

Step4: Create Button <Bottom 5> with action <Set Variable>

    . Variable : vShow

    . Value : SUM(IF(AGGR(RANK(Sale),Product)>=5,Sale))

Step5: Create a chart with

    . Dimension : Product

    . Expression : =$(vShow)

See the sample attached file.

Regards,

Sokkorn

View solution in original post

1 Reply
Sokkorn
Master
Master

Hi,

Let try

Step1: Load data

[Data]:

LOAD * INLINE [

No,Product,Sale

1,P1,10

2,P2,15

3,P3,5

5,P4,25

6,P6,12

7,P7,9

8,P8,7

9,P9,17

10,P10,11]

Step2: Create variable by Goto Settings ==> Variable Overview ==> Add ==> Give variable name <vShow>

Step3: Create Button <Top 5> with action <Set Variable>

    . Variable : vShow

    . Value : SUM(IF(AGGR(RANK(Sale),Product)<=5,Sale))

Step4: Create Button <Bottom 5> with action <Set Variable>

    . Variable : vShow

    . Value : SUM(IF(AGGR(RANK(Sale),Product)>=5,Sale))

Step5: Create a chart with

    . Dimension : Product

    . Expression : =$(vShow)

See the sample attached file.

Regards,

Sokkorn