# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Specialist

## I need to know which seller sold the most for customers.(\$)

need to correct the set analysis below. For a seller who sold more, not the last seller.

I would like to know which was the best seller of each customer.

=FirstSortedValue(Apelidox1, -Aggr(Sum({\$<[Movimento_Tipo_Operacao]={'VND'},[Apelidox1]-={'Brindes'},[CodigoClasseCliente]={'1'},[Dt_Passou1]={'0'} >}Preco_Final), CodigoCliente))

But in the set analysis she is bringing the seller's last sold seller.

In the images below see the example:

The saleswoman Denise Garcia was the last saleswoman by date. But who sold the most went to Rosane Antunes?

Neves
1 Solution

Accepted Solutions
Highlighted
MVP

But CodigoCliente = 12710 only has Denise Garcia (Apelidox1) within the sample provided... how can you get to Rosane Antunes if it is not even available for 12710

13 Replies
Highlighted
MVP

May be try this

``=FirstSortedValue(Apelidox1, -Aggr(Sum({\$<[Movimento_Tipo_Operacao] = {'VND'}, [Apelidox1] -= {'Brindes'}, [CodigoClasseCliente] = {'1'},[Dt_Passou1] = {'0'}>} Preco_Final), CodigoCliente, Apelidox1))``
Highlighted
Specialist

Rosane Antunes correct:

Who else sold in Valor. Denise Garcia is the last seller and was the one who sold the least.🙄

Neves
Highlighted
MVP

Did you try changing to the new expression?

Highlighted
Specialist

Neves
Highlighted
MVP

In the above qvw, I am only seeing Denise Garcia for 12710... Is this data missing the other option?

Highlighted
Specialist

Yes

Neves
Highlighted
Specialist

Is filtering by client code on qvw

Neves
Highlighted
MVP

Then how can I determine if the expression I gave it working or not...

Highlighted
Specialist

Rosane Antunes correct

Neves