Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

anithalux6
New Contributor III

How to create a set analysis for calculating average

I need to create a set analysis expression for :

Avg( field_value when max of selected date , field_value when max of selected date) . How is this possible?


Basically I have a table with counts for a yearmonth date. So foa a selection made I need to do an average of the count between the max and min selected date.

2 Replies
ychaitanya
Contributor III

Re: How to create a set analysis for calculating average

Hi Anitha

You could try as follows:

Create two variables for the mindate and maxdate as vmindate and vmaxdate

Avg({<Date={">$(=$(vmindate) )<= $(=$(vmaxdate))"}>}Sales)

Please try and mark the response as per the result.

Thanks

Digvijay_Singh
Honored Contributor III

Re: How to create a set analysis for calculating average

May be something like this -

Avg({<Date={">=$(vminDate)<=$(maxDate)"}>}field_value)

Community Browser