3 Replies Latest reply: Jun 22, 2012 3:56 PM by Jason Michaelides

# Max and Min function on an expression within a table

I am fairly new to Qlikview, certainly interms of slightly more advanced calculations etc.  Hope someone can help:

I have a chart table with the following columns/rows - see attached picture.

'Ability' is an expression based on a simple a/b formula

I wish to create a variable called 'Max Ability' which returns a constant of the max ability value for all rows.

It could even be another expression, rather than a variable.

I have tried various things but cannot get any to work.  My attempt at creating a Max Ability Epxression in another column returned teh same values as the Ability column itself!!

I'm sure this is probably very easy - can someone please put me on the right path?

Thanks

• ###### Re: Max and Min function on an expression within a table

Hi tim,

You can achieve that using the parameter TOTAL in the aggregation, i.e.: sum(total A)/sum(total B).

Hope this helps you,
Cesar.

• ###### Re: Max and Min function on an expression within a table

Hi Cesar - Thanks for your input.

But this just seems to give me an average figure:

SUM(TOTAL[Rules Races Winnings]/SUM(TOTAL[Rules Races Wins])/100)

Which gives answer =42 and it should be = 66

What did I do wrong?

• ###### Re: Max and Min function on an expression within a table

Hi,

Try:

MAX(TOTAL SUM([Rules Races Winnings]/([Rules Races Wins]/100)))

Hope this helps,

Jason