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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
pauljohansson
Creator III
Creator III

Using variable in SET Analysis

Hi,

Im using a indirect Set Analysis where I want to select the Sum of deposits for the Customers that NOT are associated to the current selection. I also want to take into account a variable value. I get stuck when im combining selections and variable values in my indirect analysis SET.

My Base expressions - this works fine!

IF (vPaymentActivity = 'Payment Activity',
if(Sum(pmtAmount_EUR_Deposit)>=vPaymentAmount, Sum(pmtAmount_EUR_Deposit),),
Sum(
{<
PaymentDate=E(PaymentDate),
pmtAmount_EUR_Deposit=E(pmtAmount_EUR_Deposit)>} pmtAmount_EUR_Deposit))

However, I want pmtAmount_EUR_Deposit do be dynamic, linked to a variable, NOT to the selection in the field. What I would assume to work is:

IF (vPaymentActivity = 'Payment Activity',
if(Sum(pmtAmount_EUR_Deposit)>=vPaymentAmount, Sum(pmtAmount_EUR_Deposit),),
Sum(
{<
PaymentDate=E(PaymentDate),
pmtAmount_EUR_Deposit=E(>=$(vPaymentAmount)>} pmtAmount_EUR_Deposit))

To conclude:

Instead of referencing to the selections in field pmtAmount_EUR_Deposit, i want to reference to the vPaymentAmount.

Any advice are welcome,

thanks in advance,

br

Paul

Labels (1)
1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Use set analysis in E() function

Sum(
{<
PaymentDate=E(PaymentDate),
pmtAmount_EUR_Deposit=E({<
pmtAmount_EUR_Deposit = {">=$(vPaymentAmount)"}>} pmtAmount_EUR_Deposit)>} pmtAmount_EUR_Deposit)

View solution in original post

2 Replies
michael_maeuser
Partner Ambassador
Partner Ambassador

try this

IF (vPaymentActivity = 'Payment Activity',
if(Sum(pmtAmount_EUR_Deposit)>=vPaymentAmount, Sum(pmtAmount_EUR_Deposit),),
Sum(
{<
PaymentDate=E(PaymentDate),
pmtAmount_EUR_Deposit={'>=$(vPaymentAmount)'>} pmtAmount_EUR_Deposit))

CELAMBARASAN
Partner - Champion
Partner - Champion

Use set analysis in E() function

Sum(
{<
PaymentDate=E(PaymentDate),
pmtAmount_EUR_Deposit=E({<
pmtAmount_EUR_Deposit = {">=$(vPaymentAmount)"}>} pmtAmount_EUR_Deposit)>} pmtAmount_EUR_Deposit)