Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Peony
Creator III
Creator III

KPI chart and dimension for max value

Hi all.

I have a table like this one:

Layers:

Load*Inline [

Layer,    Amount

L1,          3

L2,         12

L3,         6

];

I have a KPI object to show Max(Layer) value. And I want to show as a label for this expression for which layer name this expression is related. Now it will be L2, but the next reload it may be the other one. So I need some dynamic in the label name. 
Can someone tell how to create dynamic label?

 

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

try this as title expression

=FirstSortedValue(Layer,-aggr(Max(Amount),Layer))

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

try this as title expression

=FirstSortedValue(Layer,-aggr(Max(Amount),Layer))

Peony
Creator III
Creator III
Author

Thank you for help. It works. 
Can you, please, explain why there is a minus before Aggr? 

dplr-rn
Partner - Master III
Partner - Master III

Aggr creates a virtual table and if you dont have minus the layer with least will be returned by first sorted value.

Peony
Creator III
Creator III
Author

Understood. Thank you👍!