# New to QlikView

Discussion board where members can get started with QlikView.

Contributor

## Expression to show all values

Im trying to complete the table below, can anybody help with the changes to the DLWG 3 batch per rearer expression to make this table populate completely,  and so I can show these values in a chart?

DLWG :

Avg({<[DLWG1]-={"0"},[DATE IN] = {"\$(=Max([DATE IN]))"}>} aggr(rangeavg(above(Total Avg({<[DATE IN]=,[DLWG1]-={"0"}>}DLWG1),0,3)),[DATE IN]))

DLWG 3 batch:

Avg({<Rearer,[DLWG1]-={"0"},[DATE IN] = {"\$(=Max([DATE IN]))"}>}Aggr(rangeavg(above(Total Avg({<Rearer,[DATE IN]=,[DLWG1]-={"0"}>}DLWG1),0,3)),[DATE IN],Rearer))

This should be the average of DLWG1 for the 3 most recent DATE IN per REARER

Some sample data attached

Labels (3)

• ### rangeavg

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Expression to show all values

see attached file

hope this helps

5 Replies
Honored Contributor II

## Re: Expression to show all values

can u share the qvw or at least some rawdata?

Contributor

## Re: Expression to show all values

Example of data attached, this is what I am trying to achieve

Thanks

Honored Contributor II

## Re: Expression to show all values

see attached file

hope this helps

Contributor

## Re: Expression to show all values

Thankyou !

Yes that works, the only problem is when there are less than 3 batches.

So is there a way I can change the /3 part on the end to divide by a count of the DATE IN up to 3  ( so if there are only two batches it will divide by two)

Honored Contributor II

see attached qvw