Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QlikView: Set Analysis to Count Items with A and Only A

 

I have data like this

 

Month           Invoice #       Attributes

May                123                  A

May                123                  B

May                124                  A

June                125                  B

June                125                  C

June                126                  A

June                126                  C

July                  127                  A

July                  128                  A

July                  128                  B

July                  128                  C

July                  129                  C

July                  130                  A

I would like to count how many invoices have A and only A.  In this sample data, this would be invoices 124, 127, 130.

 

I would make a chart (pivot table) and I would like the end result to look like this:

Month           #Invoices with Only A

May                1

June               0

July                 2

Is it possible to compute the[ # Invoices with Only A] expression using Set Analysis?

I know I could make something in the LOAD script to flag the invoices but I’m wondering if this is possible in set analysis.

 

Thanks

 

 

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

Is this what you are looking for.

View solution in original post

5 Replies
Anil_Babu_Samineni

May be this?

Count({<[Invoice #] = {'124','127','130'}, Attributes = {A}>} Attributes)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thank you for the suggestion, but I'm looking for a solution that does not involve putting the invoice numbers into the set analysis.  There are thousands of them and that's what I am trying to count.  I will need to put the Attribute "A" into the Set Analysis code for sure though.

Anil_Babu_Samineni

Even Million of records it should work

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
neelamsaroha157
Specialist II
Specialist II

Is this what you are looking for.

Anonymous
Not applicable
Author

That is exactly what I am looking for, thank you so much!