Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

george456
New Contributor III

Error in set modifier

Dear Community

I am missing something in this syntax and cannot see where the problem is:

=sum({<Type={'TM 1','JE Forecast','QC Releases','Production Plan'},Brand={$(vBrand)}>}Units)/1000

 

The wizard keep showing:  Error is set modifier  ad hoc list :',' or ')' expected

Please advise

 

9 Replies
MVP
MVP

Re: Error in set modifier

The issue could lie in your variable vBrand definition. Could you share the definition?

george456
New Contributor III

Re: Error in set modifier

Hi

The Definition is:

 

=GetFieldSelections(Brand)

MVP
MVP

Re: Error in set modifier

Change the definition to:

=chr(39)&GetFieldSelections(Brand, chr(39)&','& chr(39)) &chr(39)

 

and try..

george456
New Contributor III

Re: Error in set modifier

Hi

Thanks for the suggestion but that did not render any output.

 

I noted the following:"

In the bottom part on the expression editor the formula is picking up my brand and populating it into the syntax

 

Please see attached screenshot

 

MVP
MVP

Re: Error in set modifier

With proper variable definition, your brand selected value should have been enclosed by quotes, and that is missing I can see. Could you share your sample app?

Partner
Partner

Re: Error in set modifier

Hi,

only by sharing the variable def and the sample data, we can assure you.

As i guess, you have used the input variable object and added the Vbrand variable in the input object.

In this case , u dont have to have $ sign.

you can directly call the variable as 

(sum({<Type={'TM 1','JE Forecast','QC Releases','Production Plan'},Brand={vBrand}>}Units)/1000)

 

george456
New Contributor III

Re: Error in set modifier

Hi

Thanks. Unfortunately I cannot share data. Prohibited to do so. I will look at your suggestion and work from there 

Thanks

 

Regards

 

george456
New Contributor III

Re: Error in set modifier

Dear Community

 

Thanks for help. I have managed to find solution based on your guidance:

Here is the syntax that created the correct output

=(sum({<Type={'TM 1','JE Forecast','QC Releases','Production Plan'},Brand={'$(vBrand)'}>}Units)/1000)

 

I included the single quote between the Curly brackets in brand

Regards

Partner
Partner

Re: Error in set modifier

Glad to have a connect !!