Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a variable like this:
Variable name: vYear
Expression: Year(AddYears(Max(Date),-1))
When I put this Variable in NPrinting I do <vYear> it gives me the expression above, what I want is the result of the expression.
How do I do this?
May be call it as [vYear]
you need to evaluate your expression - which means you need to have "="ign in front of your expression:
like:
Expression: =Year(AddYears(Max(Date),-1))
cheers
Lech
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Can you clarify this post? Is the logic done in the script portion and if so, what does that look like? I'm currently picturing or assuming the variable in the script is like this:
SET vYear = Year(AddYears(Max(Date),-1));
Thanks.
I think I figured out what was meant by the "=". I did this in the Variable editor and not the script, but maybe you can do it in both places...I'm not sure.
you can do it in both places. In script however i think you will have to use LET statement and apostrophies
like:
LET vYear = '=Year(AddYears(Max(Date),-1))';
That's what I was looking for; I'll have to try that. Thanks.
see how it goes.. cheers Lech