Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I ned to replicate the following excel logic into qlikview.
I have the following table in qlikview:
USERID | Role | Perfil | Administrativos | Aprobadores | Consultores Express | Consultores Intensos | Expertos Digitales | Fricción Autenticación | Monetarios | Preparadores |
Total | 6.62% | 6.92% | 46.53% | 3.20% | 4.02% | 9.97% | 7.65% | 15.08% | ||
U1 | T1 | 1.11% | 3.33% | 95.56% | ||||||
U2 | T2 | 1.25% | 98.75% | |||||||
U3 | T1 | 98.96% | 1.04% |
I need to add a column that show the name of the column for the max value for each user.
In excel I do it using this combination of functions:
any idea?
Are your columns (from Administrativos to Preparadores) values of the same dimension? i.e. do you have a field in your data that contains, as values, those headers? If that's the case, you could achieve what you are looking for with something like this (where PercentageType is your dimension and #PercentageValue your values)
=FirstSortedValue(PercentageType ,-aggr(Sum(#PercentageValue ),CostType),1)
If your data is not structured that way, you can edit your loading script with a CrossTable to make a bit easier to work with
Are your columns (from Administrativos to Preparadores) values of the same dimension? i.e. do you have a field in your data that contains, as values, those headers? If that's the case, you could achieve what you are looking for with something like this (where PercentageType is your dimension and #PercentageValue your values)
=FirstSortedValue(PercentageType ,-aggr(Sum(#PercentageValue ),CostType),1)
If your data is not structured that way, you can edit your loading script with a CrossTable to make a bit easier to work with
You could use DISTINCT but it's only going to give you one, not both
=FirstSortedValue(DISTINCT PercentageType ,-aggr(Sum(#PercentageValue ),CostType),1)