Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kunkumnaveen
Contributor III

where to put variable

Hello All,

i have  a variable

set vdate= 'date=,week=';

and i have a exp:

Num(sum(  aggr ( avg(units),Date, top,Work )) ,'#,##0')


i want to add a varible in to this exp ,i tried over here  which is not working 

Num(sum(  aggr ( avg(units),$(vdate),Date, top,Work )) ,'#,##0')


so where should i need to put this variable so that if i select any date  it should not reflect my chart



thanks

naveen

1 Solution

Accepted Solutions

Re: where to put variable

May be like this:

Num(Sum({<$(vdate)>} Aggr(Avg({<$(vdate)>} units), Date, top, Work)) ,'#,##0')

3 Replies

Re: where to put variable

May be like this:

Num(Sum({<$(vdate)>} Aggr(Avg({<$(vdate)>} units), Date, top, Work)) ,'#,##0')

Re: where to put variable

Try this.

Num(sum( {<$(vdate)>} aggr ( avg({<$(vdate)>}units),Date, top,Work )) ,'#,##0')


Regards,

Kaushik Solanki

miguelbraga
Valued Contributor III

Re: where to put variable

Hey there,

Why not the vDate Variable be something like this:

vDate = Max(Date).

This way you can get the values from your selected Date.

Hope this helps you, if not please tell me,

Regards,

MB

Community Browser