Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Using variables to create a set analysis expression

Hi,

I think that it could be very useful to create a set analysis expression as sum(myVar myAmount), with myVar built by a macro.

Is it possible? Thanks

3 Replies
erich_shiino
Honored Contributor

Using variables to create a set analysis expression

Sure,

The syntax is almost like that.

You can use:

SUM( $(varSet) VALUE)

and varSet can be set by macro to be the following string (for example):

{<TEAM={A}>}

Not applicable

Using variables to create a set analysis expression

Hi,

I've tried your syntax and I've a syntax error. VALUE is underlined in red.

Thanks

erich_shiino
Honored Contributor

Using variables to create a set analysis expression

This is only and example, in this case I made sum of VALUE.

You can replace it by your fields (the same applies to the variable name and set analysis expression in it)

EDIT: I agree that QV 10 SR2 does not recognize this as a valid expression on the syntax checker but it works.

(You have to agree this is not a very common structure)

Community Browser