Discussion Board for collaboration on QlikView Layout & Visualizations.
my data is more complex but for the sake of this question lets assume:
country, customer and sales
now i have a pivot with country as dimension
and max(sales) as expression
that works and gives me the highest sales in each country
now it happens so in each country there are more then 1 customer with the highest sale
i want to count those
any ideas on how?
and the result i need:
Go to Solution.
FirstSortedValue( Aggr(Count(Customer),Sale, Country), -Aggr(Sale, Sale, Country))
Or you can achieve this using a temporary variable:
your answer is the "correct".
his answer is not the right one, it was how i approached the problem too but it doesnt work.
your answer tho is genius, it took me while to understand how come the firstsortedvalue function works here
but once i realised how, it hit me how simply great is your approach
what was baffling to me was that "FirstSortedValue" returens a null if the highest number appears in more then 1 row.
but since your using it on an aggregation, that insures there will never be to values the same the top.