Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analisys with expression DSE

Immagine.pngHi,

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

1 Solution

Accepted Solutions
kuba_michalik
Partner - Specialist
Partner - Specialist

$(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.

View solution in original post

2 Replies
kuba_michalik
Partner - Specialist
Partner - Specialist

$(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.

Not applicable
Author

great, thanks.

Mauro