Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jorditorras
Creator
Creator

Set Analysis wrong behavior

Dear Gurús, 

I'm creating a very simple Set Analysis, but the behavior is a bit strange and I don't know why....

My calculation is like this:

Sum({ < [Imputation Type]={'11'} >} ([Purchase value]))

As I only want to Sum "Purchase Value" for my data set when my selection contains "Imputation Type" = '11'.

However then if I make a selection of data that doesn't include any document with "imputation type"='11', they include  the value of it anyway (even if they are not in my selection). 

A different example to explain this: 

If I create a table with Dimension: "Imputation Type" and Measure "Sum([Purchase value]", then I would see:

Purchase Value for Imputation type "11" and the rest of "Imputation types" has value 0, but if I filter by "Imputation Type "2", I still see data for "11" even when it's not in my selection!

I hope I explained it clear enough....

Can anybody help me with this? 

Thanks!!

1 Solution

Accepted Solutions
marcus_sommer

It's an expected behaviour because with set analysis you could not only set certain conditions respectively selections else you could also ignore or overwrite selections. Therefore it depends on your requirement which set analysis is suitable for your view. In your case you might add an * to reflect further the selections, like:

Sum({ < [Imputation Type] *= {'11'} >} [Purchase value])

More detailed background to it could you find here:

Set-Analysis-syntaxes-examples 

 - Marcus

View solution in original post

2 Replies
eliran
Creator III
Creator III

Hi,

 

I think it may be easier to understand with a data sample.

Can you share this app?

If not, uploade an image of the table schema, maybe something to do with the data.

 

Regards,

Eliran.

marcus_sommer

It's an expected behaviour because with set analysis you could not only set certain conditions respectively selections else you could also ignore or overwrite selections. Therefore it depends on your requirement which set analysis is suitable for your view. In your case you might add an * to reflect further the selections, like:

Sum({ < [Imputation Type] *= {'11'} >} [Purchase value])

More detailed background to it could you find here:

Set-Analysis-syntaxes-examples 

 - Marcus