Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

field max in the table

hello,
I have a table of QlikView this:

I need to turn this table by display only the row with the maximum value of the field cost with the aggregation on the field A.

in this way:   

ABdatamax costo
000010003012/12/20141,737
000020000112/12/20141,735
000020002412/12/20141,735
000190002412/12/20141,735
000245535712/12/20141,735
000275144312/12/20141,615
000300002412/12/20141,735
000330004112/12/20141,745
000350003612/12/20141,754
000360004012/12/20141,754

What kind of transformations / expressions should I enter?

Thanks
Alex

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Straight Table

Use

Dimension

A

and below three different expressions

FOR B

=FirstSortedValue(Distinct B, -Aggr(SUM(costo),A,B))

FOR data

=FirstSortedValue(Distinct data, -Aggr(SUM(costo),A,B))

For SUM(costo)

=FirstSortedValue(Distinct Aggr(SUM(costo),A,B), -Aggr(SUM(costo),A,B))

View solution in original post

6 Replies
mato32188
Specialist
Specialist

Hi Alessandro,

switch it to straight table and create expression max(value).

M

ECG line chart is the most important visualization in your life.
yduval75
Partner - Creator III
Partner - Creator III

Hello

You can try with firstsortedvalue function.

MK_QSL
MVP
MVP

Create a table

Dimension

A

Expression

=FirstSortedValue(Distinct B, -Aggr(SUM(costo),A,B))

=FirstSortedValue(Distinct data, -Aggr(SUM(costo),A,B))

=FirstSortedValue(Distinct Aggr(SUM(costo),A,B), -Aggr(SUM(costo),A,B))

Not applicable
Author

that way I lose the information of the field b.
Could you write me an example.
Thank you very much
Alex​

Not applicable
Author

I did not understand where I should insert the given expression.
you give me an example explicit about it?
thanks
Alex

MK_QSL
MVP
MVP

Create a Straight Table

Use

Dimension

A

and below three different expressions

FOR B

=FirstSortedValue(Distinct B, -Aggr(SUM(costo),A,B))

FOR data

=FirstSortedValue(Distinct data, -Aggr(SUM(costo),A,B))

For SUM(costo)

=FirstSortedValue(Distinct Aggr(SUM(costo),A,B), -Aggr(SUM(costo),A,B))