Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP 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
vinieme12
Champion III
Champion III

is your field SAP_PERIOD an actual date field? or text field?

try like below

VCurrentPeriod   =  DATE#(Date(today(),'YYYY/MM'),'YYYY/MM')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
implanet
Contributor III
Contributor III
Author

The SAP_Period is a text field, it is a concatenation of 2 other fields :

SAP_Fiscal_Year&'/'&SAP_Fiscal_Period as SAP_Period

We also try to force with the text() function, same result.

antoniotiman
Master III
Master III

Hi Antoine,

there's equal sign to the left of definition VCurrentPeriod ?

and in expression

SAP_Period = {'$(VCurrentPeriod)'}

Regards,

Antonio

ahaahaaha
Partner - Master
Partner - Master

Hi,

Try

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


Regards,

Andrey

implanet
Contributor III
Contributor III
Author

If we put an equal sign, the variable is calculated and no longer in text even with the text() function (strange behavior).

Also tried the quote in the set analysis like you said, same result.

implanet
Contributor III
Contributor III
Author

I just did, nothing changed.

This issue makes me crazy ^^

I think we will change the '/' separator and put a point instead. In our locale, the point will be not interpreted as an operator.

antoniotiman
Master III
Master III

You put the expression in the column of a chart and you see what it shows, like

zebhashmi
Specialist
Specialist

I was thinking Andrey Khoroneko formula will work.

then may be you can try

=sum({1<SAP_Period = {$(=Date('=VCurrentPeriod', YYYY,MM)}>} Amount_CashCumul)


or


=sum({1<SAP_Period = {$(=Date($(=VCurrentPeriod), YYYY,MM)}>} Amount_CashCumul)


Regards



implanet
Contributor III
Contributor III
Author

I tried to define the VCurrentPeriod variable as a date like Vineeth suggested

VCurrentPeriod   =  DATE#(Date(today(),'YYYY/MM'),'YYYY/MM')

And then in the expression, interpreting SAP_Period as a date like:

=sum({1<date#(SAP_Period,'YYYY/MM') = {$(=VCurrentPeriod)}>} Amount_CashCumul)

This is not working.

So I reverse to the variable VCurrentPeriod   =  year(today())&'/'&num(month(today()),00) and I tried your expressions. Not working too.

Honestly since we have been working with qliksense (more than 6 months now), we are still confronted to this kind of situation, which is very frustating. Do you know if a debug mode will be implemented for the chart mode?