Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have finance data such that there are 3 columns: physician_name who is receiving payment, sender_name who is sending money to the physician, and the corresponding amount.
This data is at a transaction level, where each row represents one transaction.
I want to GroupBy phy_name and sender_name and display the amount that the 2nd highest sender is paying to the physician. When I say 2nd highest sender, I mean at a physician level, that is the 2nd highest sender can be different for different physicians. So simply GroupBy and take the 2nd highest sender amount at the physician level. Qlik Sense Table.
for Group By, you can create Key by combining those 2 field in one "phy_name"&'_'& "sender_name"
and for 2nd highest sender you can use max(fieldName,2)
or set analysis
Only(Aggr(max(FieldName,2),phy_name,sender_name))
Does it also take into account, the sum? Because the sender can send multiple payments to the same physician.
Also I tried this statement in my table, it gives no output.
Again my data in the backend is at each transaction level, but my qlik sense table is at physician name level.
So if one column is phy_name as dimension, another column is the top paying company amount and expression is : "max(aggr(sum(total_amount_of_payment_usdollars_op),sender_organization_op, phy_name))"
Similarly I would like to print the 2nd highest payer/sender.
Hi,
check if this helps.
update below expression with your fields and add as dimension for payer/sender. Uncheck include null values for the dimension
=IF(AGGR(Rank(SUM([gross income])),City,[Product line])=2 or
AGGR(Rank(SUM([gross income])),City,[Product line])=3,[Product line])
you can refer this link : https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-get-second-Highest-Rank-for-each-ID-in-table/...
Thanks,