Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
vishsaggi
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)

sunny_talwar

Or this

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

Anonymous
Not applicable
Author

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.

swuehl
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.