Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script Vs Set Analysis

Hi All,

I have Variables set up in my script

Let vCurrDay= date(today()-1);

Let vPrevDay = date(today()-2);




However when i use the variables in my set analysis, i get no result.


Sum({1<call_date = {$(vCurrDay)}>} calls_offered)



Both my call_date and variables return dates YYYY/MM/DD




Please help



7 Replies
SunilChauhan
Champion II
Champion II

use

Let vCurrDay= date(today()-1,'YYYY/MM/DD');

Let vPrevDay = date(today()-2,'YYYY/MM/DD');


then


Sum({1<call_date = {$(vCurrDay)}>} calls_offered)



hope this helps

Sunil Chauhan
c_gilbert
Creator II
Creator II

Try:

sum ( {$<call_date = {"$(vCurrDay)"} >} calls_offered)

Not applicable
Author

Just in case:

Do you have a call_date that is the same as date(today()-1)?

To test this try an expression like the following on a QlikView table:

if(call_date=date(today()-1),'true')

aveeeeeee7en
Specialist III
Specialist III

Try something like this:

Sum({1<call_date={'$(=(vCurrDay))'}>}calls_offered)

Regards

Aviral Nag

VishalWaghole
Specialist II
Specialist II

Hi Stephen,

Try this,

=Sum({1<call_date={'$(vCurrDay)'}>}calls_offered)


whenever you are using variable inside set analysis it should be in single inverted comma.


Hope this will solve your issue.


-- Regards,

Vishal Waghole

Not applicable
Author

thanks this worked 100's

Anonymous
Not applicable
Author

Hi Stephen,

Try below syntax as well:

=Sum({<Call_Date={"<$(vCurrDay)"}>}Call_Details)

Thanks and Regards,

Nita