Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

"Error in expression: ')' expected" while loading script

Hi all,

I am trying to load below expression ,getting error saying "Error in expression: ')' expected" but i have made sure every thing is fine,whats making me get this error.

CurrentCampaignData:

Load

batch_meta_data_id,

campaignid as current_campaign_id

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()))+1)) and batch_meta_data_id = (23,24,25));

Please help me in this regard.

Thanks,

Supriya

1 Solution

Accepted Solutions

Re: "Error in expression: ')' expected" while loading script

As jontydkpi mentioned, make correction in your syntax

Resident CAMPAIGN

WHERE (current_start_date = Date(weekstart(Num(today()))+1)) and match(batch_meta_data_id ,'23','24','25');

11 Replies
sureshqv
Esteemed Contributor III

Re: "Error in expression: ')' expected" while loading script

Hi,

CurrentCampaignData:

Load

batch_meta_data_id,

campaignid as current_campaign_id

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today())+1)) and batch_meta_data_id = (23,24,25));

berryandcherry6
Contributor II

Re: "Error in expression: ')' expected" while loading script

Hi,

thanks for your reply

But having same issue

sureshqv
Esteemed Contributor III

Re: "Error in expression: ')' expected" while loading script

try

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()+1))) and batch_meta_data_id = (23,24,25));

berryandcherry6
Contributor II

Re: "Error in expression: ')' expected" while loading script

Hi,

Showing same error.

MVP
MVP

Re: "Error in expression: ')' expected" while loading script

This is invalid syntax:

batch_meta_data_id = (23,24,25)

The where clause should probably be:

Where current_start_date = Date(weekstart(Num(today()+1)))

     and Match(batch_meta_data_id, 23,24,25);

anagharao
Contributor II

Re: "Error in expression: ')' expected" while loading script

As batch_meta_data_id is a integer and not a string , 'in' clause or structure will lead to an error.

use:

Resident CAMPAIGN Where ((current_start_date = Date(weekstart(Num(today()))+1)) and MATCH(batch_meta_data_id, 23, 24,25));

Re: "Error in expression: ')' expected" while loading script

As jontydkpi mentioned, make correction in your syntax

Resident CAMPAIGN

WHERE (current_start_date = Date(weekstart(Num(today()))+1)) and match(batch_meta_data_id ,'23','24','25');

berryandcherry6
Contributor II

Re: "Error in expression: ')' expected" while loading script

Hi kushal chawda,

Thanks it worked,

Can i pass this obtained values from this table to set analysis,to evaluate ?

Re: "Error in expression: ')' expected" while loading script

yeah, You can pass these values to set analysis if you don't want to use in WHERE clause