Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

P() in set analysis to identify row by row

Need to find ID's that are common in both sets. Below Expression is not working!

=count({<[ID] = P({<Month_Year = [set1]::Month_Year>})*P({<Month_Year = [set2]::Month_Year>})>}ID)

4 Replies
Champion III
Champion III

Did you try like this?

=count({<[ID] = P({[set1]<Month_Year = $::Month_Year>}[ID]) * P({[set2]<Month_Year = $::Month_Year>} [ID]) >} ID)

Or this

=Count({<[ID] = P({1<Month_Year = [set1]::Month_Year>})*P({1<Month_Year = [set2]::Month_Year>})>}ID)

Creator III
Creator III

I am having different answers using above

=Count({<[ID] = P({1<Month_Year = [set1]::Month_Year>})*P({1<Month_Year = [set2]::Month_Year>})>}ID)

=count({<[ID] = P({[set1]<Month_Year = $::Month_Year>}[ID]) * P({[set2]<Month_Year = $::Month_Year>} [ID]) >} ID)

and when I am seeing individual sets counts 

Count({$*set1}ID)  is not giving me same result in  Count({<[ID] = P({1<Month_Year = [set1]::Month_Year>})ID)

How do I get common ID's when two months are selected in alternative sets of Month_Year filter.

MVP
MVP

If you want to find IDs that are common in both sets, this should be enough:

Need to find ID's that are common in both sets. Below Expression is not working!

=count({<[ID] = P({set1}) * P({set2})>} ID)


If your ID field is a key field, don't use a plain count(). Add a DISTINCT qualifier or count a non-key field.

=count({<[ID] = P({set1}) * P({set2})>} DISTINCT ID)


Also note that your current  / inherited selections in other fields might interfere with your set modifier.