Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show the Highest % Value in Text Box from a Chart

Hi,

I have a chart that uses a dimension: BaseOption, and uses an expression of: Sum(Data)/Sum(RecordCount). This all works fine, but I need to show the highest value from this chart within a text box. Example: "xx% is the highest percentage of this chart"

Any ideas?

Cheers,

CG

1 Solution

Accepted Solutions
pennetzdorfer
Creator III
Creator III

max(aggr(Sum(Data)/Sum(RecordCount),BaseOption))

See http://community.qlik.com/docs/DOC-3857 for further information on aggr()

Hope that helps,

Florian

View solution in original post

4 Replies
pennetzdorfer
Creator III
Creator III

max(aggr(Sum(Data)/Sum(RecordCount),BaseOption))

See http://community.qlik.com/docs/DOC-3857 for further information on aggr()

Hope that helps,

Florian

Not applicable
Author

Ah great thanks

To build on this, is it possible to get the Label as well? Example: the highest percentage is 70% and it's BaseOption label is "Apples". So that in a text box I can have "70% - Apples"

Thanks for the great help!

Not applicable
Author

Ah nevermind I got it from the document you supplied:

=FirstSortedValue(BaseOption, -aggr(Sum(Data)/Sum(RecordCount),BaseOption))

Thanks again for the enlightenment

Cheers,

CG

Not applicable
Author

If anyone else comes across this, if you want to select the reverse of FirstSortedValue, remove the '-' in front of the 'aggr' in the above expression.

Cheers,

Rikard