Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Do More with Qlik - for Beginners and Beyond, Topic: Qlik Replicate on January 21, 2PM EST. REGISTER NOW
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.