Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
max(aggr(Sum(Data)/Sum(RecordCount),BaseOption))
See http://community.qlik.com/docs/DOC-3857 for further information on aggr()
Hope that helps,
Florian
max(aggr(Sum(Data)/Sum(RecordCount),BaseOption))
See http://community.qlik.com/docs/DOC-3857 for further information on aggr()
Hope that helps,
Florian
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!
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
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