Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
implanet
Contributor III
Contributor III

set analysis issue

Hello,

We try to figure out why our expression is not calculated :

=sum({1<SAP_Period = {$(VCurrentPeriod)}>} Amount_CashCumul)

where VCurrentPeriod is a variable and is : year(today())&'/'&num(month(today()),00)

Displaying $(VCurrentPeriod) is 2017/05 and SAP_Period is in format YYYY/MM

If we replace the expression by  =sum({1<SAP_Period = {'2017/05'}>} Amount_CashCumul) it is OK

Any idea why? Thank you.

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You can't put an expression on the LHS of a set expression - it must be a field name. That is not a problem, though, and I think this all you need:

sum({<SAP_Period = {'$(VCurrentPeriod)'}>} Amount_CashCumul)

VCurrentPeriod is fine as you already have it, but it must be enclosed in quotes here to prevent the dollar expansion from calculating 2017 didided by 5 for 2017/5.

You may not need the override all "{1<" at the start of the expression, unless that your specific requirement. Then use:

sum({1<SAP_Period = {'$(VCurrentPeriod)'}>} Amount_CashCumul)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
implanet
Contributor III
Contributor III
Author

HI Jonathan,

I know your solution should fix our issue, but it didn't work.

I will check with our developer partner if he can help.

Closing this thread.

Thank you all.