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: 
su_pyae
Creator
Creator

Set Analysis for multiple values and columns

Hi everyone, 

I am using a set analysis like this: Sum({$<Col_1={'11','22','33'} , Col_2= {'ABC'}>} Amount).

What I want is the sum of Amount when

  • Col_2 is ABC and Col_1 is 11 
  • Col_2 is ABC and Col_1 is 22, and
  • Col_2 is ABC and Col_1 is 33. 

I also have a filter for month so that I can see the balance per month. 

It works well when Col_1 has all 3 values in selected month. It is giving me zero when Col_1 has only 1 or 2 values in some months. 

I am not sure how to solve it. 

Labels (3)
1 Solution

Accepted Solutions
Digvijay_Singh

Can you share sample data and the expected output,  not sure if I understood the needs correctly - 

Sum({$<Col_1={'11','22','33'} , Col_2= {'ABC'}>} Amount)

Your above expression should work when Col_2 = 'ABC' AND (Col_1 is '11' OR '22' OR '33')

Can you define as I did above the exact need you have

Thanks,

View solution in original post

2 Replies
Digvijay_Singh

Can you share sample data and the expected output,  not sure if I understood the needs correctly - 

Sum({$<Col_1={'11','22','33'} , Col_2= {'ABC'}>} Amount)

Your above expression should work when Col_2 = 'ABC' AND (Col_1 is '11' OR '22' OR '33')

Can you define as I did above the exact need you have

Thanks,

su_pyae
Creator
Creator
Author

Thank you for your help. Upon further inspection, the set analysis seems to be working well. 

I assumed that it wasn't working well because I can see 11 in the filter pane but I don't see the value. 

In reality, that month doesn't have 11 as the data. I need to figure out why my filter pane is showing me the value it shouldn't have.