Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Max Value of A Ratio

I have a straight chart and trying to pick the Max value from one column and show it in the next column (repeat that value in all rows), the column form where max value should be picked is containing a ratio i.e. Field A/ Field B.

Any suggestion ?

Industry     Sales     Ratio     Max of Ratio

A               $100     4.5         7.5

B               $110     7.5         7.5

C               $105     6.8         7.5

Where, column Ratio could be like: Field A / Field B

5 Replies
MK_QSL
MVP
MVP

Max(TOTAL Ratio)

Or

Max(TOTAL (FieldA/FieldB))

PrashantSangle

Hi,

use variable,

store max ratio in variable then use in it your dimension,

varMaxRation=max(Field A / Field B)

Regards,

PS

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
maxgro
MVP
MVP

you already get the answer from previous post (TOTAL)

some more useful (I hope) explanations from QlikTech and online help

1.png

If the word total occurs before expression the calculation will be made over all possible values given the current selections but disregarding the chart dimension variables.

The total qualifier may be followed by a list of one or more field names within angle brackets. These field names should be a subset of the chart dimension variables. In this case the calculation will be made disregarding all chart dimension variables except those listed, i.e. one value will be returned for each combination of field values in the listed dimension fields. Also fields which are not currently a dimension in a chart may be included in the list. This may be useful in the case of group dimensions, where the dimension fields are not fixed. Listing all of the variables in the group causes the function to work when the cycle or drill-down level changes.

preminqlik
Specialist II
Specialist II

max(total Ratio)

Anonymous
Not applicable
Author

Thank you all. Variable approach worked. Even though same expression (used for variable) in the chart does not work.