Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with finding difference between two listboxes

Hi All,

Can someone guide me to the right formula I can use to find the difference of values between the two listboxes? I want to be able to analyze the difference between Nov and Dec. I am using expression within the listboxes to get the customer ids in the two respected months. e.g. if(month=12, customerid). I have tried every formula and filtering in the book but the difference doesn't show. They two months have formed a some kind of a array where the difference doesn't budge.

Thanks in advance.

Capture.PNG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

=Aggr(Only({<customerid = p({<month ={12}>}) -  p({<month = {11} >}) >} customerid), customerid)

View solution in original post

5 Replies
swuehl
MVP
MVP

Maybe using a field expression like

=Aggr(Only({<customerid = p({<month ={11}>}) / p({<month = {12} >}) >} customerid), customerid)

Not applicable
Author

Hi Swuehl,

That formula works great. It provides me with the difference of the customer ids for both Nov and Dec. Is there anyway I can only find the customer ids missing in the month of Nov that are present in the month of Dec or the vice versa?

Thanks in advance

erikzions
Creator
Creator

If it doesn't have to be a list box, you can use a straight table.  First column for Nov. Second for Dec.  Then a third to get the difference. 

swuehl
MVP
MVP

=Aggr(Only({<customerid = p({<month ={12}>}) -  p({<month = {11} >}) >} customerid), customerid)

Not applicable
Author

Thank you everyone for your wonderful and timely feedback.