Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mja_jami
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 (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

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

View solution in original post

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

change to
Year={"$(=max(total Year))"}
mja_jami
Contributor III
Contributor III
Author

Thank you very much.