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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
fkeuroglian
Partner - Master
Partner - Master

P() and E()

Hi Expert 

I want to create a report that said me if one DOCUMENT buy other product in the last 12 months, for example in this case the report have to return only 12345 a 10/2/2016 because in this actual month(08 august) the same document but other product in the last 12 months(10/02/2016 mont=february)

DocumentProductDate
12345a10/2/2016
12345b10/8/2016
455a10/8/2016
887c10/2/2016

I have to use P() and E() FUNCTIONS?

somebody have an example to applicate to this case?

Thanks a lot

ATTACHED THIS SAME EXCEL

Labels (1)
3 Replies
pablolabbe
Partner Ambassador
Partner Ambassador

Hi Fernando,

  Can you post an example of the final result that you need ?

Pablo

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button! | Follow me on Linkedin
pablolabbe
Partner Ambassador
Partner Ambassador

A short explanation about each function

P() let you define an element set based on possible values for a field implied by selections defined inside the parenthesis.

Example:

sum( {$<Customer = P({1<Product={‘Shoe’}>} Customer)>} Sales )
returns the sales for current selection, but only those customers that ever have bought the product ‘Shoe’. The element function P( ) here returns a list of possible customers; those that are implied by the selection ‘Shoe’ in the field Product.

E() let you define an element set based on excluded values of a field implied by selections defined inside the parenthesis.

Example:

sum( {$<Customer = E({1<Product={‘Shoe’}>})>} Sales )
returns the sales for current selection, but only those customers that never bought the product ‘Shoe’. The element function E( ) here returns the list of excluded customers; those that are excluded by the selection ‘Shoe’ in the field Product.

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button! | Follow me on Linkedin
fkeuroglian
Partner - Master
Partner - Master
Author

Pablo, this will be the result

12345 a 10/2/2016


because at this month(august) buy another product(b) and as the line show, he bought some other product(a) in the last 12 months


thanks