Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Expression enable/ disable

Hi,

I have multiple expressions in my waterall chart.

If I uncheck ENABLE option in chart properties, the right side bar should ignore this particular value in its expression.

If I Check ENABLE option in chart properties, the right side bar should consider this value and calculate accordingly.

HOW CAN I DO THIS HAPPEN.

1 Solution

Accepted Solutions
Not applicable

Re: Expression enable/ disable

Check the attached.

19 Replies
dennisnet
Valued Contributor III

Expression enable/ disable

What you can do is make a variable (fe vEnable) and make your button set this variable to 1 or o.

Where 1 Enable and 0 is Disable

Now you can use these variabel in your expression or in your dimension

dennisnet
Valued Contributor III

Re: Expression enable/ disable

Take a look at the attached file for an example.

Hope it helps.

Not applicable

Re: Expression enable/ disable

Dennis, thanks a lot.

But, this is not exactly what I was asking about.

Let me put the question clear...

I have 4 expressions in my waterfall chart.

>expr1 = 100

>expr2 = 40

>expr3 = 50

>expr4 = 10 (expr1-expr2-expr3)

now, If I uncheck 'Enable' option in chart properties for exp3 then I expr4 = (expr1-expr2).

If I check 'Enable' option' in the chart properties of the same expr3 then expr4 = (expr1-expr2-expr3).

Now is that possible to calculate expr4 based on the active and inactive status of the expr3?

dennisnet
Valued Contributor III

Re: Expression enable/ disable

If I understand you correctly you must be able to that as I did in the attached file.

Take a closer look at charts on the right. the expression there is:

If (vEnable=1 ,  Sum (Amount), Count(Amount))

This make it swicth between the 2 different expression.

So What you need is somthing like:

If (vEnable=1, (expr1-expr2), (expr1-expr2-expr3))

Let me know if this works for you ok?

If not try to upload you document or some screenshots which show how you want the outcome to be.

Not applicable

Re: Expression enable/ disable

Hey Dennis, thank u again...

Wat u said absolutely works fine...

but thing is I dont need any button for this, it should acquire the properties of expression from the chart and trigger the action accordingly.....

Not applicable

Re: Expression enable/ disable

i have an example developed for u but dont know how to upload QV file.

Any idea?

Not applicable

Re: Expression enable/ disable

hi,

i got it how to upload. First add comment then edit the comment u will be able to see Upload file.

Pls look at the above attachment.

Hope it will help you.

Not applicable

Re: Expression enable/ disable

Hey BlackRocks buddy, thanks a lot....

u really made me to think that this can be done in simple way....

how can i do the same without using the dimesion fields F1, F2?

like IF(Not IsNull(cloumn(2)), 'expr4=(expr1-expr2-expr3)', 'expr4=(expr1-expr2-expr3)')

Does this work this way...

i mean validating 'column(2)'? or is there any btr way i can handle this?

Not applicable

Re: Expression enable/ disable

hi I really didn't get you in full what you are trying to do.

in my example F1,F2 are Field names I just took for example, you can give any meaningful names to them.

You will not be able to refer column(0), column(1).. etc as you are disabling expressions based on your need.

When you disable any column it wont know that there is one column and it ignores the disabled column and counts sequentially. But in your expression it always refers to 3 columns but in reality there will be only 2 enabled. So this wont work out for your requirement

Community Browser