Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I defined a variable as vRA=max([RA.Extract]).
Then, I have an expression Sum({$<[RA.Extract]={"$(=max([RA.Extract]))"}>}OutOfOrder)
max([RA.Extract]) evaluated to '05/08/2016' in KPI, format: auto.
Sum({$<[RA.Extract]={"$(=max([RA.Extract]))"}>}OutOfOrder) evaluated to give 7, format: auto
Sum({$<[RA.Extract]={"05/08/2016"}>}OutOfOrder) evaluated to give 7, format: auto
However, when I replace max([RA.Extract]) with vRA in the expression,
Sum({$<[RA.Extract]={"$(=vRA)"}>}OutOfOrder) evaluated to give 0, format: auto
Any idea why this is the case?
It will depend on how the variable is exactly defined and which formatting will be returned (sense seems to work a bit different to qlikview regarding to max(AnyDate) which will return a numeric value like 42587 instead of '05/08/2016'). If you used:
vRA:
max([RA.Extract])
then you might need:
Sum({$<[RA.Extract]={"$(=$(=vRA))"}>}OutOfOrder)
and by
vRA:
=max([RA.Extract])
it changed to:
Sum({$<[RA.Extract]={'$(vRA)'}>}OutOfOrder)
More to them could you find here: The Magic of Variables and here: The Magic of Dollar Expansions.
- Marcus
It will depend on how the variable is exactly defined and which formatting will be returned (sense seems to work a bit different to qlikview regarding to max(AnyDate) which will return a numeric value like 42587 instead of '05/08/2016'). If you used:
vRA:
max([RA.Extract])
then you might need:
Sum({$<[RA.Extract]={"$(=$(=vRA))"}>}OutOfOrder)
and by
vRA:
=max([RA.Extract])
it changed to:
Sum({$<[RA.Extract]={'$(vRA)'}>}OutOfOrder)
More to them could you find here: The Magic of Variables and here: The Magic of Dollar Expansions.
- Marcus
Thanks Marcus! Tried this and it worked