Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Set analysis on variable

Hi,

I want to apply set analysis on a variable without separating it's components.

Var = sum(A)+sum(B)

v_Ignore_Some_selections={<DIVISION_NAME=,CC_NAME=>}


The only solution I found so far is the following:

sum($(v_Ignore_Some_selections)A)+sum($(v_Ignore_Some_selections)B)


but as I mentioned, I don't want to separate the variable components (because this way, when i change the variable i have to manually change it every place its appears)


Is it possible?

Thanks,

Nadav

5 Replies

Re: Set analysis on variable

I think what you are looking for isn't possible at least as per my knowledge.

Not applicable

Re: Set analysis on variable

If it suits you can bring in a new field from script itself as summation of A and B.

Then ignore variable.

Re: Set analysis on variable

I don't understand your worry. Variables are used to not force you to apply changes in multiple places.

If you ever want to change the set analysis selections, you only have to modify the SET statement for variable v_Ignore_Some_selections.

If you ever want to change the expression result (by adding another Sum() or so), you only have to change the SET statement for variable Var.

Or am I missing something here?

Re: Set analysis on variable

I'm not sure what do you trying to do but maybe something like this is helpful:

v_Ignore_Some_selections: {<DIVISION_NAME=,CC_NAME=>}

vExp: sum($(v_Ignore_Some_selections) $1)

Var = rangesum($(vExp(A)),$(vExp(B)))


Variables

- Marcus

Not applicable

Re: Set analysis on variable

Thanks Peter,

The variable i want to be able to change is (Var), not (v_Ignore_Some_selections).

Therefore,  if I have to write the expression explicitly (e.g- sum($(v_Ignore_Some_selections)A)+sum($(v_Ignore_Some_selections)B),

the change of the variable VAR won't affect this expression


Community Browser