# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for
Did you mean:
Highlighted
Contributor II

## Filtering records in a Straight Table and recalculating measures

I´m trying to filter some records in a straight table (based on an input variable), and then recalculate some measures. As you  can see below, in the last expression I would like to make a second agregation based on the results of column(2). In this example, the correct result for the last expression should be 23. It shows 0.  Is it possible to do a second aggr()? Expressions are evaluated from left to right?

1 Solution

Accepted Solutions
Highlighted
Master II

## Re: Filtering records in a Straight Table and recalculating measures

I guess its not possible because column(n) function and references to the expression name operate on a strictly row by row basis. It is not possible to use multirow aggregations. So i think you will have to use the original formula in order to achieve your desired output:

```max(total aggr(if(Sum (val)<\$(vFiltra),Sum (val),null()),id))
```

hope this helps

4 Replies
Highlighted
Champion III

## Re: Filtering records in a Straight Table and recalculating measures

Is your col2 is a field name from your table or an expressions? If it is an expression just use like

= Max(TOTAL <ID> col2Expr)

Highlighted
Contributor II

## Re: Filtering records in a Straight Table and recalculating measures

Col2's expresion:  Column(2)

Highlighted
Master II

## Re: Filtering records in a Straight Table and recalculating measures

I guess its not possible because column(n) function and references to the expression name operate on a strictly row by row basis. It is not possible to use multirow aggregations. So i think you will have to use the original formula in order to achieve your desired output:

```max(total aggr(if(Sum (val)<\$(vFiltra),Sum (val),null()),id))
```

hope this helps

Highlighted
Contributor II

## Re: Filtering records in a Straight Table and recalculating measures

Thanks, Frank.

Everything fine now.

Regards