Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ribeiro
Specialist
Specialist

The best seller by product group.

I need to know which seller sold more by product group. Like the image below.

Set analysis:

=FirstSortedValue(Apelido, -Aggr(Sum({$<Ano ={$(=Year(today()))},Mes={$(=Month(today()))},
[CodigoFilial]={'7'},[CodigoClasseCliente]={'1'},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={'0'} >}Preco_Final), CodigoGrupo))

 

What am I doing wrong...

Set analysis: Only a few sellers appear

2019-03-13_09-42-09.png2019-03-13_09-44-17x.png

Neves
4 Replies
kishorj1982
Creator II
Creator II

Hi,

In your scenario firstsortedvalues is not the best option.

You may use set analysis followed by aggr function for this.

Thanks

 

Ribeiro
Specialist
Specialist
Author

Aggr (Only ({$ <Ano = {$ (= Year (hoje ()))}, Mes = {$ (= mês (hoje ()))},
[CodigoFilial] = { '7'}, [CodigoClasseCliente] = { '1'},
[Movimento_Tipo_Operacao] = { 'dev', 'VND', 'VPC', 'VEF', 'ECA', 'FPV', 'CVE'}, [Dt_Passou1] = { '0'} >} Apelido), Apelido)

 

did not work.. Any suggestion

 

Neves
raman_rastogi
Partner - Creator III
Partner - Creator III

Try This

=FirstSortedValue(Apelido, -Aggr(Sum({$<Ano ={$("=Year(today())")},Mes={$("=Month(today())")},
[CodigoFilial]={7},[CodigoClasseCliente]={1},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={0} >}Preco_Final), CodigoGrupo,Cod))

Ribeiro
Specialist
Specialist
Author

I just brought a group with no rating

=FirstSortedValue(Apelido, -Aggr(Sum({$<Ano ={$("=Year(today())")},Mes={$("=Month(today())")},
[CodigoFilial]={7},[CodigoClasseCliente]={1},
[Movimento_Tipo_Operacao]={'DEV','VND','VPC','VEF','ACE','FPV','CVE'},[Dt_Passou1]={0} >}Preco_Final), CodigoGrupo,NomeGrupo))

xxxx.png

Neves