Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

Set Exp not changing if i change the values of the fields in the set expression through a filter

Hi Guys,

I am using set expression for my calculation which has some fields in it to drill down the data before making the calc. So my exp looks something like this

Sum({<Field1 = {'A'}, Field2 = {'B'}, Field3 = {'C'}>} Sales)

Now if i select any value other than 'A' in a filter for Field1, i want my expression to go Null but it keeps on displaying the value that it would for Field1 = A and it is same for Field2 and Field3 as well. Selecting values for any other field works as expected. Now, I am sure this is how Qlik folks have meant this to work but i think i am lacking in some understanding when it comes to Set expression behavior against filter selections.

So, i want my set expression to throw me a Null whenever user selects anything other than A,B and C in Field1,Field2 and Field3 filters respectively.

Thanks,

Pranav

Labels (3)
1 Solution

Accepted Solutions
rubenmarin

Hi, you can try with:

Sum({<Field1 *= {'A'}, Field2 *= {'B'}, Field3 *= {'C'}>} Sales)

But instead of null it will return zero, you can enclose it in a if() to question if the result is zero, and then set a null 

View solution in original post

2 Replies
rubenmarin

Hi, you can try with:

Sum({<Field1 *= {'A'}, Field2 *= {'B'}, Field3 *= {'C'}>} Sales)

But instead of null it will return zero, you can enclose it in a if() to question if the result is zero, and then set a null 

View solution in original post

pranaview
Creator III
Creator III
Author

Hi Ruben,

 Yes, this is what i was looking for,Thanks for your response.

Regards,
Pranav