Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combine two expressions, even though one is missing values in dimension

Hello all,

I have a small and stupid question regarding expressions.

As you can see on screenshot, I have two expressions: Exp01 and Exp02

For Exp01 I have all values in dimensions, and for second one I am missing location.

I would like to have a Exp03 which will multiply Exp01 and Exp02, but it returns 0;


Example values:


Exp01 Exp02 Exp03

1          15          15

0.5         8            4

0.33       9            3


In this case that I am having, I would get 0, since there are missing info for Exp02


Thank you

1 Solution

Accepted Solutions
swuehl
MVP
MVP

What about using

Sum(Total<Col02, Col01> Field02)

as second expression?

View solution in original post

6 Replies
shraddha_g
Partner - Master III
Partner - Master III

What you have written in Expression?

Not applicable
Author

Exp01

(Sum(Field01) / Sum(TOTAL < Col02, Col01> Field01) )

Exp02:

sum(Field02)

shraddha_g
Partner - Master III
Partner - Master III

Try

Column(1)*Column(2)

swuehl
MVP
MVP

What about using

Sum(Total<Col02, Col01> Field02)

as second expression?

Not applicable
Author

Please check the screenshot, since it will return on all rows 0.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Exp02 seems to return values, even when a Dimension contains a NULL. No problem, for Exp03 you can try recovering the calculations already done for Exp01 and Exp02 by simply referring to their Labels in your third expression. Like this:

= Exp01 * Exp02

The expression syntax checker will color the expression names blue if it recognizes them.

Note that in an expression you can only refer to other expressions in the same object. You cannot use Dimension labels, but you can use Dimension field names of course.