Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm a newbie in qlikview, so I'm readig some techincal manual to learn this environment.
Sorry if my question is already answered.
I have some problem with variables and expression.
In my application I have an expression defined as
eMaxAnnoSelezione = (Max(Anno))
where Anno is a field of my table.
so when I create a pivot table containing a sum on set analisys based on eMaxAnnoSelezione I'm unable to appropriate evaluate it (see the image).
Label works fine (caption become 'Totale ' followed by expression evaluation) but the expression doesn'w work.
I tried all possible combinations of DSE syntax... where I'm wrong?
thanks for your help.
Mauro
$(eMaxAnnoSelezione) expands to a formula, so your set analysis is effectively this:
{$<Anno={(Max(Anno))}>}
This is not valid and will fail. On the other hand, it's perfectly valid in the label, because
='Totale' & (Max(Anno))
is a valid expression.
What you want to do, is probably to calculate the max year directly in the expression. To do that, define the variable as
=Max(Anno)
(the equal sign in front is key)
That way, it will evaluate to the max year for the current selection right in the variable itself, and then $(eMaxAnnoSelezione) will expand to the year value (2014 for example):
{$<Anno={2014}>}
which is valid and will work.
$(eMaxAnnoSelezione) expands to a formula, so your set analysis is effectively this:
{$<Anno={(Max(Anno))}>}
This is not valid and will fail. On the other hand, it's perfectly valid in the label, because
='Totale' & (Max(Anno))
is a valid expression.
What you want to do, is probably to calculate the max year directly in the expression. To do that, define the variable as
=Max(Anno)
(the equal sign in front is key)
That way, it will evaluate to the max year for the current selection right in the variable itself, and then $(eMaxAnnoSelezione) will expand to the year value (2014 for example):
{$<Anno={2014}>}
which is valid and will work.
great, thanks.
Mauro