Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a question :
For exemple, I have data with :
- id_bill, amount ...
In my report, I get the max(amount) of my data.
It’s possible to click on the result and go to the id_bill which corresponds ?
Thanks.
Hi @Talend45 ,
You cannot do selections on measures/expressions.
However, there is a workaround, that can show you what is the id_bill responsible for the maximum amount.
You can use two different expressions that work more or less the same way:
1. FirstSortedValue, something like:
FirstSortedValue([id_bill],Aggr(Max([amount]),[id_bill]))
Basically here you are building a virtual table where you have id_bill as a dimension and Max(Amount) as expression, and after you are checking what is the First sorted value of id_bill;
2. Only, something like:
Only({<[Invoice value]={"$(=max([Invoice value]))"}>}[0SALESORG])
Which is very similar to the first one, in terms of how Qlik interprets it.
The issue with both is that if you have 2 or more id_bill with the same maximum value the expressions will return null.
Hope it helps 😉
Regards
Hi @jberna26 ,
Thanks for your response.
For example, in this topic, I want to get the id_bill that corresponds of the result , it’s possible ? Be cause I have 100 k rows and I can’t test if the solutions is correct
https://community.qlik.com/t5/New-to-Qlik-Sense/Max-of-a-column-pivot/td-p/1668600
Hi @Talend45 ,
I believe the answer is similar, although my french is a little rusty 😉
You would have to build an Aggr using the expressions, with the id_bill as an aggregated dimension.
Although, it can have an impact on performance, since Aggr functions in the front-end consume a lot of memory.
If you want, please share some sample data, so I can look into it.
Regards 🙂
PS: in my previous post I made a mistake in one of the formulas:
Only({<[Invoice value]={"$(=max([Invoice value]))"}>}[id_bill])