Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Replacing hardcode script Year ={'2019'}, with Variable {$<Year={$(=max(total Year))}>}

Hello Qlik Experts,

I want to replace the following script with variable.  

(

sum ({< Year ={'2019'}, DateType={'Production'}, Status={'Active for the week'}> }   DBL_premium ) - sum ({< Year ={'2019'}, DateType={'FC'}>} canpol_premium) + sum ({< Year ={'2019'}, DateType={'Production'}, Status={'Active for the week'}> }   add_premium ) -sum ({< Year ={'2019'}, DateType={'FC'}>} canpol_add_premium ) + sum ({< Year ={'2019'}, DateType={'Production'}, Status={'Active for the week'}> }   pfl_premium ) - sum ({< Year ={'2019'}, DateType={'FC'}>} canpol_pfl_premium )

)

I’ve declared this  vSETCY which is {$<Year={$(=max(total Year))}>} and when trying to use vSETCY in script, it’s not giving me the right result with mine, and therefore would appreciate if someone could help. Thank you very much for your time and effort.

Best regards,

Jami

Labels (3)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

change to
Year={"$(=max(total Year))"}

View solution in original post

2 Replies
Highlighted
Partner
Partner

change to
Year={"$(=max(total Year))"}

View solution in original post

Highlighted
Contributor III
Contributor III

Thank you very much.