Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find min and max value in a column

Hello.

I have a table with a column (let's say A) with many values. I need to give a full score of 10 to the row where its value in column A is the biggest and a score of 0 to the minimum value of column A. How can I state which are those values please? I've tried with max() and rangemax() functions, but with no success.
If this can help, consider that value in column A are not ready when data are imported into QlikView, but they are calculated in the table itself.

Thank you,
Luca

1 Solution

Accepted Solutions
Not applicable
Author

Hi Luca,

hope below helps. Basically how it works is that QV aggregates the data first based on dimension customer and then compares for every aggregated row if this row equals the MAX/MIN (that's why I used the aggr function).

Cheers, Lukas

View solution in original post

6 Replies
Not applicable
Author

Hi Luca, please see below if it's what you're looking for.

-Lukas

Not applicable
Author

Hi Lukas.

Thank you for your help. Unfortunately that's not exactly what I'm looking for. Please have a look to the attached file: your example works because F1 are value stored as they are in the QV data source, but in my case they are obtained by an expression. I can't have the max value in this case.

There is a table in my file with an example.

Not applicable
Author

Hi Luca, it makes things more complex, but should be doable in most cases.

I've updated the example with a column that determines where F1+F2 has the biggest / smallest value.

Might help if you could post your qvw.

-Lukas

Not applicable
Author

I can't post the original document, but I've made a new one, with the same problem. I have some customers with the transact log of all their purchases. For each transaction I have buy and sell price, so I know the markup. In the table I need to populare "Max markup" column with 15,60 €, the highest markup of the whole table.

If I can calculate this, I will calculate also the min markup and I'll be able to give the scores 0-10 as needed.

MS Excel has natively this function: MAX(<range>).

Thanks for your help and time!

Not applicable
Author

Hi Luca,

hope below helps. Basically how it works is that QV aggregates the data first based on dimension customer and then compares for every aggregated row if this row equals the MAX/MIN (that's why I used the aggr function).

Cheers, Lukas

Not applicable
Author

That is! Thank you very muck, Lukas!