Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ribeiro
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
sunny_talwar

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
sunny_talwar

May be try this

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

 

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
sunny_talwar

Did you try changing to the new expression?

Ribeiro
Specialist
Specialist
Author

follow qvw above

 

 

 

 

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

Neves
sunny_talwar

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

Ribeiro
Specialist
Specialist
Author

Yes

Neves
Ribeiro
Specialist
Specialist
Author

Is filtering by client code on qvw

Neves
sunny_talwar

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

Ribeiro
Specialist
Specialist
Author

Rosane Antunes correct

 

Neves