Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 😕
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)
Hi,
maybe there is better solutions, but I normally use setanalysis for this.
Try With only({<DepositAmount={"$(=max(DepositAmount))"}>}Customer)
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)
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
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.
Hi David,
As for my understanding
='Name: '&concat({<DepositAmount={"$(=max(DepositAmount))"}>}customer,'|') & Chr(13)&
'value: '&Aggr(max(DepositAmount),customer)&
Hi
David can you try this one
=concat({<Amount={"$(=max(Amount))"}>}Name,'|') & ' ,'&max(Amount)
Thanks it work