Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using an Expression Label as a component of another Expression


I have created a set analysis expressions like this   =sum({<[Work Location State]={"QLD"}>}Count)

and given it the label "Queensland". I want to create a second expression like this

=sum({<[Product]={"Helmet"}>}Queensland)   there is no other dimension/expression called Queensland.

It doesn't work. Also, on a similar note I cannot create an expression such as this (using does not equal) it just doesn't work.

=sum({<[Work Location State]-={"QLD"}>}Count)   or   sum({<[Work Location State]<>{"QLD"}>}Count)

Are either of these expression types possible and if so what am I doing wrong?

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Darren,

=sum({<[Work Location State]-={'QLD'} >}Count)

Actually this is a bug in qlikview, you just ignore it.  Also, we cannot use an expression in other expression, if it is there it is very good to use.

Please close this discussion if your issue is solved, it helps others to find solution.

Regards,

Jagan.

View solution in original post

3 Replies
jagan
Luminary Alumni
Luminary Alumni


Hi,

This expression

=sum({<[Product]={"Helmet"}>}Queensland)  doesn't work, since it is an expression you should use directly.  You can achieve this by using this

sum({<[Product]={"Helmet"}, [Work Location State]={"QLD"} >}Count)

This expression works

=sum({<[Work Location State]-={'QLD'} >}Count)  Qlikview will show you syntax error but it works.

Regards,

Jagan.

Not applicable
Author

Thanks Jagan, a very helpful response!

I often get syntax errors from QlikView where the syntax does seem to work. Is this a QV error, or can I avoid this? It is a little confusing and doesn't give me confidence in what I am reporting.

Also, I cant see why I cant use the expression in the expression, and would be helpful if this were possible, especially when nesting.

jagan
Luminary Alumni
Luminary Alumni

Hi Darren,

=sum({<[Work Location State]-={'QLD'} >}Count)

Actually this is a bug in qlikview, you just ignore it.  Also, we cannot use an expression in other expression, if it is there it is very good to use.

Please close this discussion if your issue is solved, it helps others to find solution.

Regards,

Jagan.