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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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
sunny_talwar

May be like this:

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

View solution in original post

3 Replies
sunny_talwar

May be like this:

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

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


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
miguelbraga
Partner - Specialist III
Partner - Specialist III

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