Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
george456
Creator
Creator

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
tresesco
MVP
MVP

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

george456
Creator
Creator
Author

Hi

The Definition is:

 

=GetFieldSelections(Brand)

tresesco
MVP
MVP

Change the definition to:

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

 

and try..

george456
Creator
Creator
Author

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

 

tresesco
MVP
MVP

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?

Anismohamed32
Partner
Partner

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
Creator
Creator
Author

Hi

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

Thanks

 

Regards

 

george456
Creator
Creator
Author

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

Anismohamed32
Partner
Partner

Glad to have a connect !!