Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

gizzel123
New Contributor II

Need variables (for aggregate functions) used in charts according to the dimensions

I tried to add variable in place of expression, lets say for

Exp1=sum()  I created a variable ..with  vSum=Sum(field),

but the problem is ..the vsum is not according to the dimensions..it is coming as a total for the whole field.?

I need to do this because I want to add triggers using variables.

please help.

1 Solution

Accepted Solutions
MVP
MVP

Re: Need variables (for aggregate functions) used in charts according to the dimensions

Hi

In your load script, define vSum using Set, not Let:

Set vSum = Sum(Field);

Then in your expression, use

=$(vSum)

If that is still not respecting the dimensions, then its possible that the dimensions are not properly associated with [field] in your data model.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
3 Replies

Re: Need variables (for aggregate functions) used in charts according to the dimensions

if you writ set vsum ...

and use your variable in the expression it will be computeddinamically according to the object you use

MVP
MVP

Re: Need variables (for aggregate functions) used in charts according to the dimensions

Hi

In your load script, define vSum using Set, not Let:

Set vSum = Sum(Field);

Then in your expression, use

=$(vSum)

If that is still not respecting the dimensions, then its possible that the dimensions are not properly associated with [field] in your data model.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gizzel123
New Contributor II

Re: Need variables (for aggregate functions) used in charts according to the dimensions

Thanks Guys, it

worked 

Community Browser