Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
davidsabban
Contributor III
Contributor III

Get the field that linl tothe max value

Hi,

I have variable in the UI that present the max value of deposit.

max(DepositAmount) - this value appears in the text box object.

I want to show in the text box not only the amount it self but also  the name of the customer.

In other words, I wondering if there is a function that returns fields that link to the max value like customer name/country and etc.

Hope it's clear what I asking 😕

1 Solution

Accepted Solutions
stabben23
Master
Master

If you have many Customer/Country which have the same DepositeAmount, use

concat({<DepositAmount={"$(=max(DepositAmount))"}>}Customer,'|') to get all  separated With a | sign, otherwise you will get a - (null value)

View solution in original post

7 Replies
stabben23
Master
Master

Hi,

maybe there is better solutions, but I normally use setanalysis for this.

Try With only({<DepositAmount={"$(=max(DepositAmount))"}>}Customer)

stabben23
Master
Master

If you have many Customer/Country which have the same DepositeAmount, use

concat({<DepositAmount={"$(=max(DepositAmount))"}>}Customer,'|') to get all  separated With a | sign, otherwise you will get a - (null value)

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Also, I would add a predicate DISTINCT

=Concat(Distinct {<

  Sum = {"$(=max(Sum))"}

>}Customer, ', ')

In case you have duplicates like in 4th and 5th rows of the code:

LOAD * INLINE [

    Customer, Sum

    A, 1

    B, 4

    B, 4

    C, 3

    C, 4

];

Result would be only B, C

stabben23
Master
Master

Yes thats correct if he use Customer from the fact table, but i'm pretty sure that he have a dimesion table which contain the distinct customer, but if I'm wrong Distinct predicate is needed.

Not applicable

Hi David,

As for my understanding

='Name:       '&concat({<DepositAmount={"$(=max(DepositAmount))"}>}customer,'|') & Chr(13)&            

'value:          '&Aggr(max(DepositAmount),customer)&

Not applicable

Hi

David can you try this one

=concat({<Amount={"$(=max(Amount))"}>}Name,'|') & ' ,'&max(Amount)

davidsabban
Contributor III
Contributor III
Author

Thanks it work