Qlik Community

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 
Search instead for 
Did you mean: 
Highlighted
Specialist
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?

 

2019-06-11_18-00-30.jpg

2019-06-11_18-01-57.jpg

 

Neves
1 Solution

Accepted Solutions
Highlighted

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

image.png

View solution in original post

13 Replies
Highlighted

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
Specialist

 

Rosane Antunes correct:

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

2019-06-11_18-36-58.jpg

Neves
Highlighted

Did you try changing to the new expression?

Highlighted
Specialist
Specialist

follow qvw above

 

 

 

 

2019-06-11_18-49-00.jpg

Neves
Highlighted

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

Highlighted
Specialist
Specialist

Yes

Neves
Highlighted
Specialist
Specialist

Is filtering by client code on qvw

Neves
Highlighted

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

Highlighted
Specialist
Specialist

Rosane Antunes correct

 

Neves