Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Problem using p() and e() in set analysis

Hi guys,

I'm trying to do an example of the excluded function e() in set analysis, but I can't make it work.

I have a simple table with two fields : Code and Amount.

The total amount is 1.601.985

So if I filter for amounts bigger than 800 and lower than 1400 :

The current amount is 521.905


And the excluded amount would be the substracion of the two above : 1.080.080

I'm trying to get the excluded amount with the following formula :

sum( {$< Code = E({1<Code= {'$(=vConcatSelectedCodes)'}  >})>} Amount)

where vConcatSelectedCodes is concat(distinct chr(39) & Code & chr(39) ,',')


And this is what I get :


A.png


Could somebody tell what I'm doing wrong?

In case you need, I've attached the qvw and qvd file.

Regards, Marcel.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Marcel,

try this

Sum({1<Code=E(Code)>} Amount

Regards,

Antonio

View solution in original post

2 Replies
antoniotiman
Master III
Master III

Hi Marcel,

try this

Sum({1<Code=E(Code)>} Amount

Regards,

Antonio

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks Antonio, that was it!

Regards, Marcel.