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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

(P) / (E) in Set Analysis

Trying to use the (P) and having problems.  Any idea what might be wrong with this?  What I am trying to achieve is to count the number of customers in all years.

Thanks

Count(DISTINCT{$<StartYear_Ind = {1},[Sold To] = P({1<[Valid To Year]={$(=$(vCYear) - 2)}>})*P({1<[Valid To Year]={$(=$(vCYear) - 1)}>})>} [Sold To] )*P({1<[Valid To Year]={$(=$(vCYear) - 0)}>})>} [Sold To] )

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this

Count(DISTINCT {<StartYear_Ind = {1}, [Sold To] = P({1<[Valid To Year] = {$(=$(vCYear) - 2)}>}) * P({1<[Valid To Year] = {$(=$(vCYear) - 1)}>}) * P({1<[Valid To Year] = {$(=$(vCYear) - 0)}>})>} [Sold To])

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

May be this

Count(DISTINCT {<StartYear_Ind = {1}, [Sold To] = P({1<[Valid To Year] = {$(=$(vCYear) - 2)}>}) * P({1<[Valid To Year] = {$(=$(vCYear) - 1)}>}) * P({1<[Valid To Year] = {$(=$(vCYear) - 0)}>})>} [Sold To])
tmumaw
Specialist II
Specialist II
Author

Thanks Sunny.  That worked perfectly.  Have a great weekend.