Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ribeiro
Specialist
Specialist

I'm doing it wrong because it's bringing the last seller alphabetical order

Left Join (Tab_Mov)
LOAD Ordem_Cli_For,
OrdemVendedorx,
CalendarDate,
Max(CalendarDate) as xLastException,
Max(OrdemVendedorx) as LastException
Resident Tab_Mov
where Match([Movimento_Tipo_Operacao],'VND')
Group By Ordem_Cli_For,OrdemVendedorx,CalendarDate;

 

It was to bring the Seller with the last sale, this is bringing the seller Alphabetical Order.

 

Set Analysis:

MaxString({<Data_Efetivado_Estoque ={">=$(=Date(AddMonths(Max( Data_Efetivado_Estoque),vMes), 'DD/MM/YYYY'))"}, [CodigoFilial]={'7'},[CodigoClasseCliente]={'1'},
[Movimento_Tipo_Operacao] = {'VND'}, [Dt_Passou1] ={'0'}>} ApelidoLastException)

 

The Sure would look like this:

Date                         Vendedor

08/02/2019           Taynara

01/03/2019           Antonia

26/12/2018          Paula

 

The Value that is appearing:
08/02/2019           Taynara
Smiley Frustrated

 

It was to bring the Seller with the last sale, this is bringing the seller Alphabetical Order.

 

I need the Last date to bring the last seller

 

01/03/2019           Antonia

 

 

Neves
1 Solution

Accepted Solutions
marcus_sommer

Try it with: firstsortedvalue({< YourSetAnalysis >} Vendedor, -Date)

- Marcus

View solution in original post

2 Replies
marcus_sommer

Try it with: firstsortedvalue({< YourSetAnalysis >} Vendedor, -Date)

- Marcus

Ribeiro
Specialist
Specialist
Author

Smiley Very Happy

Neves