Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm asked to create all the variables in a script instead of using the variable overview of qlikview and what is working in that tool is not working in a script.
I've the following filter set in the tool:
Variable Name: vFiltreCurrentWeek
Variable Value: DeclarationDate = {">=$(=Date(DATE_REFERENCE)-6)<=$(=Date(DATE_REFERENCE))"}
When i'm try to create that variable with a script, i've an internal error:
DeclarationDate = {">=(internal error)<=(internal error)"}
The script i'm using is:
SET vFiltreCurrentWeek = 'DeclarationDate = {">=$(=Date(DATE_REFERENCE)-6)<=$(=Date(DATE_REFERENCE))"}';
It seems that the $ aims to evaluate what is in the () so i tried to replace it by chr(36):
SET vFiltreCurrentWeek = 'DeclarationDate = {">=' & chr(36) & '$(=Date(DATE_REFERENCE)-6)<=' & chr(36) & '$(=Date(DATE_REFERENCE))"}';
And quite have the same result:
'DeclarationDate = {">=' & chr(36) & '(internal error)<=' & chr(36) & '(internal error)"}'
Any Idea.
Thanks in advance.
He! He! I found it:
Just have to replace the SET by the LET to evaluate the formula ....
LET vFiltreCurrentWeek = 'DeclarationDate = {">=' & chr(36) & '(=Date(DATE_REFERENCE)-6)<=' & chr(36) & '(=Date(DATE_REFERENCE))"}';
He! He! I found it:
Just have to replace the SET by the LET to evaluate the formula ....
LET vFiltreCurrentWeek = 'DeclarationDate = {">=' & chr(36) & '(=Date(DATE_REFERENCE)-6)<=' & chr(36) & '(=Date(DATE_REFERENCE))"}';