Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Not applicable

where clause in expressions

Hi Experts,

I have a requirement in my project where an user enters the min and max limit of a column(through input box).

I am saving these in variables ...var1 & var2.

I need to show the value of Avg(column1) where value of column1 > $(var1) and < $(var2) in a textbox.

I am not able to create this successfully.

Any help would be much appreciated.

Thanks in advance.

1 Reply

Re: where clause in expressions

Hi Nayana, supossing you have a table with a dimension 'Dim' and value 'Data' you can use this expression in table:

If(Sum(Data)>=$(var1) and Sum(Data)<=$(var2), Sum(Data))

For the average check the total type as 'average'

In a text box you can show the Avg() with this expression:

=Avg(Aggr(If(Sum(Data)>=$(var1) and Sum(Data)<=$(var2), Sum(Data)), Dim))