Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi Guys!
hope you could help me out.
I would like to calculate a sum till a certain time point in previous year, depending on what do I choose in a variable, below is what I came up with, nevertheless it doesn't work, although similar builds in the project do.
Sum({$<
[Date]= {"$(<=addyears(date('$(vRollingForecastBeginning)'), -1))"}
>}
ActualsValue)
The expression alone:
addyears(date('$(vRollingForecastBeginning)'), -1)
returns '07/01/2016' and reacts to variable changing correctly, [Date] is formatted as Date in script so the formats should be aligned.
do you have any ideas?
thanks in advance,
Bart
Your expression should be rather look like:
Sum({$<
[Date]= {"<=$(=addyears(date('$(vRollingForecastBeginning)'), -1))"}
>}
ActualsValue)
- Marcus
Your expression should be rather look like:
Sum({$<
[Date]= {"<=$(=addyears(date('$(vRollingForecastBeginning)'), -1))"}
>}
ActualsValue)
- Marcus
Hi Bartosz,
I've edited the title of this thread to replace "<=" with "less than or equal to", as the symbols were cause a page display issue.
Best regards,
Qlik Community Team
hi Marcus,
works like a charm, thank you!
I wonder why in some case you need the additional "=" and in some you don't...
best
Bart
hi Jeremy,
thanks!
regards,
Bart
Here it's very well explained why and where the "=" made a difference:
The Magic of Dollar Expansions
- Marcus