Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
bharani8
Contributor III

Create buttons with Actions

Hi Experts - For the attached chart.. i need to have 3 buttons.. say "0%-10%" ; "11%-20%",">20%"... When i click the "0%-10%" button... %'s belonging to those shuld reflect in my chart (chk attached qvw).. like wise for other buttons as well..

2 Solutions

Accepted Solutions

Re: Create buttons with Actions

I added a new table in the field like this

LOAD * Inline [

Aging_Bucket1

Null

];

and then used this expression

=If(Len(Trim(Concat(DISTINCT {<Aging_Bucket1 = {"=sum(Amt)/sum({<Aging_Bucket1>}TOTAL Amt) > 0.1 and sum(Amt)/sum({<Aging_Bucket1>}TOTAL Amt) <= 0.20"}>} Chr(34) & Aging_Bucket1 & Chr(34), '|'))) > 0,

'=sum(Amt)/sum({<Aging_Bucket1>}TOTAL Amt) > 0.1 and sum(Amt)/sum({<Aging_Bucket1>}TOTAL Amt) <= 0.20',  'null')

Re: Create buttons with Actions

Change the action to this (ignore selection in PL)

=If(Len(Trim(Concat(DISTINCT {<PL = {"=sum({<PL>}Actual)/sum({<PL>}Target) > 0.85 and sum({<PL>}Actual)/sum({<PL>}Target) <= 2.00"}>} Chr(34) & PL & Chr(34), '|'))) > 0,

'=sum({<PL>}Actual)/sum({<PL>}Target) > 0.85 and sum({<PL>}Actual)/sum({<PL>}Target) <= 2.00',  'null')

49 Replies
prieper
Honored Contributor II

Re: Create buttons with Actions

Base formula may look like

IF(sum(Amt)/sum(TOTAL Amt) > 0.3 AND sum(Amt)/sum(TOTAL Amt) < 0.4, sum(Amt))

0.3 and 0.4 might be replaced by corresponding variables.

These variables might be set in a trigger.

bharani8
Contributor III

Re: Create buttons with Actions

Can you show that in the qvw file ?

Re: Create buttons with Actions

see the attached

bharani8
Contributor III

Re: Create buttons with Actions

Hi Kushal - is it possible to do without changing the expression? I mean.. with my old expression itself...

antoniotiman
Honored Contributor III

Re: Create buttons with Actions

Hi Bharani,

see Attachment.

Regards,

Antonio

Re: Create buttons with Actions

No, as your requirement is by creating the buttons and click on that you need to change the expression

Or
Valued Contributor II

Re: Create buttons with Actions

I'd recommend against the approach of only showing partial values (and I'd also recommend against using a line to show the percentages - there's no association between them and the line is misleading). I've used a similar approach to highlight the relevant values within the chart - suggestion is attached.

bharani8
Contributor III

Re: Create buttons with Actions

Wow this looks So Simple!! Thanks!! But may i know why u changed the expression for % ? Why is that required? Can u plz explain to understand ?

bharani8
Contributor III

Re: Create buttons with Actions

Hi Shoham - Good idea.. But my requirement is to show only those pertaining to those %'s... Not to Highlight..