Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jduluc12
Creator
Creator

p() in set analysis

HI,

I want to write an expression to include amount only for those customer whose name starts with "ABC" but does not have address which starts with "XYZ"

sum({<Customer=p{1<Name={'ABC*'}, Address={'*'} - {'XYZ'}>Customer}>}Amount)

it is not working and it behaves exactly like as if the statetment is

sum({<Customer=p{<Name={'ABC*'}>Customer}>}Amount)


what am i doing wrong?


Thanks

10 Replies
sunny_talwar

May be this

Sum({<Customer = p({1<Name={'ABC*'}, Address=-{'XYZ*'}>} Customer) >}Amount)

jduluc12
Creator
Creator
Author

nope...it is not working

i tried that

hari8088
Creator
Creator

May be like this..

sum({<Customer=p{1<Name={'ABC*'}, Address-={'XYZ*'}>Customer}>}Amount)

sunny_talwar

Have you made sure that p is followed by '(' and ends with ')'... you don't have () and there were other issues....

jduluc12
Creator
Creator
Author

This the exact statement that i have written.

and p is followed by ( and ends with )

sunny_talwar

Do you see an error or 0?

jduluc12
Creator
Creator
Author

here is the whole expression

sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>

* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]=-{‘XYZ’}>}Number)>}Amount)

sunny_talwar

Address starts with XYZ or is XYZ? You don't have an asterisk for Address?

sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>

* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]=-{‘XYZ*’}>}Number)>}Amount)

jduluc12
Creator
Creator
Author

the strange part is

if i remove - from [Address]=-{‘XYZ’} then it works perfectly according to the expression i.e. it brings only those names who’s address starts with XYZ

sum({<Month=, Year=,Number=,[Type={‘Regular’}, Account={‘def’}>

* 1<Memo=p({<Memo=,Name={‘ABC*’}, [Address]={‘XYZ’}>}Number)>}Amount)