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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Variables

Any idea why this expression doesn't work?

I feel like the syntax is right but it says it is expecting another '}' somewhere

=sum({$(vYTD)}[Total Revenue])

20 Replies
Anil_Babu_Samineni

May be this?

=sum({< $(vYTD) >}[Total Revenue])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

How do you define your variable vYTD?

May be you need this

=Sum({<$(vYTD)>}[Total Revenue])

khaycock
Creator
Creator
Author

Nope still has the same error

khaycock
Creator
Creator
Author

Nope still has the same error

Anil_Babu_Samineni

Would you declare the variable

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

How do you define vYTD?

avinashelite

what is the condition your trying

=Sum({<Feild_name={'$(vYTD)'}>}[Total Revenue])


you need to define the left hand side

vishsaggi
Champion III
Champion III

Is this right way?

= Sum({< [Total Revenue] = {'$(vYTD)' } >} [Total Revenue])

avinashelite

Whats the value you have in vYTD and [Total Revenue] ?

Eg. vDate=07/03/2017

and feild = date ... and has value like 07/03/2017, 08/03/2017 ,09/03/2017

= Sum({< [date] = {'$(vDate)' } >} [Total Revenue])