Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression - condition

Hi, everybody,

I have an straight table with an expression:

count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)

How is the correct syntax for setting condition for showing record only if expression value > 3 ?

Thank you in advance.

Duski

48 Replies
Not applicable
Author

I'm sorry, sunindia,

I'm testing on the trial version of QlikView and I cannot use other files, only mine 😞

Duski

sunny_talwar

This is equivalent to your Test:

Equivalent to your other expressions:

Difference in output. Below straight table is after I use [Total Units] > 0 in my other two expressions.

sunny_talwar

If this still isn't working for you, I would suggest using the other method I mentioned:

Use the same condition for all your expressions in the particular table:

If(count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)>3, yourExpression, 0)

I really hope that one of the two solutions will work out for you.


Best,

S

alexandros17
Partner - Champion III
Partner - Champion III

In every expression you have to add the condition:

If(count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)>3,

    myexpression,

0)

Not applicable
Author

Thank's, Alessandro,

your answer solved my problem.

The solution was put the condition INTO THE DEFINITION field, NOT INTO THE CONDITION field 😞

Thank you.

Duski

sunny_talwar

I am glad your problem is resolved.

Best,

S

Not applicable
Author

Hi, sunindia and other Qlikview friends,

once more question relating to my problem.

I have now in every of my expressions the formula, which works, The value myExpression is 0 for the record, when the If-condition is not fulfilled.

If(count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)>3,

    myexpression,

0)

But if I turn totals on, the total value for myExpression is not correct, because total sums ALL records, not only the non zero records for myExpression.

What can I do ?

Thanx in advance.

Duski

alexandros17
Partner - Champion III
Partner - Champion III

Could you please mark the answer?

Thanks

Not applicable
Author

I'm sorry, Alessandro,

but I cannot understand you.

Your answer from 2.2.2015 9:00 solved my problem from that time.

But now I have a new problem ... 😞

Duski

sunny_talwar

Try something like this:

=If(count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)>3,

    Sum(Aggr(If(count({$<Kód={'M'},Druh={'VP'},Séria={'04. Nominácie_VÚ'}>}Projekt)>3, myexpression, 0), chartDimension)), 0)

Use Sum/Count/Min/Max based on what you have used in your expression. If your expression uses Sum, use Sum. If it uses Count, use count in place of the bolded Sum.

Hope this helps.

Attaching the sample file as well.

Best,

S