Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Dimension Value in Textbox

Hi all,

Anyone know how to get dimension value in textbox?

For example i have table :

Country         Value

A                   500

B                  1000

C                  2000

D                  300

E                  1200

I want to show country with the lowest value (for ex) in textbox. Is it possible?

The textbox must be like this:

"Country with lowest value is : D"

Or have any idea to solve this?

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

FirstSortedValue takes a third argument where you can define which value in sort order should be returned

=FirstSortedValue(Country, Value, 2)

=FirstSortedValue(Country, Value, 3)

return the Country with second / third smallest Value). Please refer to the HELP for more detail.

View solution in original post

4 Replies
swuehl
MVP
MVP

Try something like

=FirstSortedValue(Country, Value)

as expression in your textbox. For max Value, use

=FirstSortedValue(Country, -Value)

Hope this helps,

Stefan

Not applicable
Author

thanks swuehl for your response.

it work! thanks. but what the expression if i want to show 2 or 3 value?

for ex: D, A , and B ??

swuehl
MVP
MVP

FirstSortedValue takes a third argument where you can define which value in sort order should be returned

=FirstSortedValue(Country, Value, 2)

=FirstSortedValue(Country, Value, 3)

return the Country with second / third smallest Value). Please refer to the HELP for more detail.

Not applicable
Author

ok thanks swuehl for your help.