Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wizardo
Creator III
Creator III

how to return 0 (zero) when set analysis expression not fulfilled

hi,

let's say i have a set analysis expression like this

sum( {<Year={2015}>} sales)

and there is no year 2015 in the data

the expression is calculated and returns sales for all the years

my question is

is it possible to make it return 0 (zero) instead?

or do I have to use IF

thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

DANIEL CHOTZEN wrote:

hi,

let's say i have a set analysis expression like this

sum( {<Year={2015}>} sales)

and there is no year 2015 in the data

the expression is calculated and returns sales for all the years

my question is

is it possible to make it return 0 (zero) instead?

or do I have to use IF

thanks

This is not correct. Qlik returns 0 (zero).

Could you share a sample where the behavior (as you explained) could be noticed? I can think of one possibility - your field reference might be being wrong, i.e. - may be, by mistake you are typing a  wrong field name in set analysis.

View solution in original post

2 Replies
tresesco
MVP
MVP

DANIEL CHOTZEN wrote:

hi,

let's say i have a set analysis expression like this

sum( {<Year={2015}>} sales)

and there is no year 2015 in the data

the expression is calculated and returns sales for all the years

my question is

is it possible to make it return 0 (zero) instead?

or do I have to use IF

thanks

This is not correct. Qlik returns 0 (zero).

Could you share a sample where the behavior (as you explained) could be noticed? I can think of one possibility - your field reference might be being wrong, i.e. - may be, by mistake you are typing a  wrong field name in set analysis.

wizardo
Creator III
Creator III
Author

my mistake