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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
schmidtj
Creator II
Creator II

Set Analysis question

Hi,

i have a stupid question i think but here it goes:
The following SET ANALYSIS counts the IDs where name is either test OR test2.
I am wondering if there is a way to achieve that only the IDs are counted where name is test AND test2.
I know i could solve that problem somehow via the data script but i was hoping to do it with SA.

Thanks a lot.

 

Count
(
  {
    $<              
      [Name] = {'test', 'test2'}
    >
  }

  ID
)

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
MVP
MVP

I think it's 

Count({ <ID=P({<Name={'test'}>})> * <ID=P({<Name={'test2'}>})> } ID) 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

4 Replies
joaopaulo_delco
Partner - Creator III
Partner - Creator III

Hi @schmidtj !

 

               How is possible the field name have "test" AND 'test2' value??

I think what you trying to do is impossible.

 

Help users find answers! Don't forget to mark a solution that worked for you!
schmidtj
Creator II
Creator II
Author

Hi,

well ok i dont mean the name of the field i mean the value of the field 'Name'.
It is basically a 1:n relation so 'Name' can have multiple values.

 

rwunderlich
MVP
MVP

I think it's 

Count({ <ID=P({<Name={'test'}>})> * <ID=P({<Name={'test2'}>})> } ID) 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

schmidtj
Creator II
Creator II
Author

Great, thanks working, thanks a lot!