Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Get max value

Hello, i think my issue is not so difficult to solve but i can't tackle it.

Indeed, i have a simple array with 2 rows:  WEEK and VALUE

I want to get the value of the highest WEEK:

for exemple :  WEEK  |  VALUE

                    23            1

                    24           4

                    25          2

I have a textbox and i would like to return: 2.

How can i do that?

Thank you in advance

1 Solution

Accepted Solutions

Re: Get max value

Hi

Try like this

=Sum({<Week = {$(=Max(Week))}>}Value)

4 Replies

Re: Get max value

Hi

Try like this

=Sum({<Week = {$(=Max(Week))}>}Value)

Not applicable

Re: Get max value

Thank you! You are perfect

Not applicable

Re: Get max value

I know your got this answered - but you could also do like this:

I make a ApplyMap (Lookup) where i find the matching value from the latest week  by peeking into the column.

Highlighted
Not applicable

Re: Get max value

Dear friend, i have now another problem,

          ID |  WEEK  |  VALUE

          1       23            1

          1      24           4

          1      25          2

           2  23...

           2  25..

          2.....

I would like to Sum value between max week for each ID. Is it possible ?

I did

=Sum(TOTAL aggr({<week= {$(=Max(week))}>}value,id))

but doesn't work.

Thank you

Community Browser