Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
alkesh_sharma
Creator III
Creator III

Error in Set Expression

Hello All,

I am Using the following Expression:

=Sum({<[Revenue.Invoice Date] = {$(vCutoffDate)}>} [Revenue.Invoice Amount]/vMillion)

Its returning me an Error: ERROR in SET MODIFIER, ',' or ')' Expected.

Need Help..

27 Replies
jyothish8807
Master II
Master II

Hi,

Try this:

=Sum({<[Revenue.Invoice Date] = {'$(=vCutoffDate)'}>} [Revenue.Invoice Amount]/$(=vMillion))

REgards

KC

Best Regards,
KC
alexandros17
Partner - Champion III
Partner - Champion III

is vMillion a variable? If yoe try $(vMillion)

ashfaq_haseeb
Champion III
Champion III

Hi,

make sure you have proper date format,

Then try below

=Sum({<[Revenue.Invoice Date] = {'$(=vCutoffDate)'}>} [Revenue.Invoice Amount])/vMillion

Or

=Sum({<[Revenue.Invoice Date] = {'$(=vCutoffDate)'}>} [Revenue.Invoice Amount])/$(vMillion)

Regards

ASHFAQ

Not applicable

Try this,


=Sum({<[Revenue.Invoice Date] = {'$(=vCutoffDate)'}>} [Revenue.Invoice Amount]/vMillion)

stabben23
Partner - Master
Partner - Master

If you have sum in your variable then you have to move it outside expression, like Ashfaq shows.

alkesh_sharma
Creator III
Creator III
Author

Nope, Its giving me 0, which is not correct.

alkesh_sharma
Creator III
Creator III
Author

This is just to convert the value in Millions, Even if I remove this, the problem is the same.

jyothish8807
Master II
Master II

Hi Try this:

=Sum({<[Revenue.Invoice Date] = {'$(=vCutoffDate)'}>} [Revenue.Invoice Amount])/$(vMillion)

If you still face issue, then check your variable ina text box and see yhe output:

In text box:

=$(vCutoffDate)

Regards

KC

Best Regards,
KC
alkesh_sharma
Creator III
Creator III
Author

Hello Jyothish,

=$(vCutoffDate) is giving me -20, I guess there is the problem.


But I am using the same variable to calculate >=Start Date to < CutoffDate which is working fine,

Also used it in >CutoffDate to <=EndDate which is also working fine,


Only = CutoffDate is not working.