Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
roberto99
Contributor III
Contributor III

Intervalmatch sales and seller

Hi, I need help I am not able to get what I need
I load these files (they are examples) but the result I get does not place according to the dimension "Tipo" and also does not create the correspondence with Depend

captura1.png

Scrit charge

Horarios:
LOAD Cod_Tie,
Fecha2,
Depend,
Horario_in,
Horario_ou,
Tipo
FROM
[G:\Descargas\Horario_Prueba.xlsx]
(ooxml, embedded labels, table is Hoja1);


Vtas:
LOAD Fecha2,
Num_Doc,
num_id,
Cod_Tie,
vta,
Hora,
Fec_Timestamp1
FROM
[G:\Descargas\Vtas_Prueba.xlsx]
(ooxml, embedded labels, table is Hoja1);

 

Left Join (Vtas)
intervalmatch (Fec_Timestamp1) LOAD Horario_in, Horario_ou,Depend RESIDENT Horarios;

Left Join (Vtas)
LOAD distinct
Cod_Tie,
Fecha2,
Depend,
Horario_in,
Horario_ou,
Tipo

Resident Horarios ;
drop table Horarios;

for the sum I use the following

Sum(Aggr(Only(vta), num_id))

for dimesion Interval

=if(num(floor(minute(Hora)/30),'')>0,
num(hour(Hora)+floor(Minute(Hora)/30)*30/100,'00:30'),
num(hour(Hora)+floor(Minute(Hora)/30)*30/100,'00:00'))
&' a '&
if(num(floor(minute(Hora)/30),'')>0,
num((hour(Hora)+1)+floor(Minute(Hora)/30)*30/100,'00:00'),
num(hour(Hora)+floor(Minute(Hora)/30)*30/100,'00:30'))

Result desired

captura2.pngThanks for the help

Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

You have this code:

Left Join (Vtas)
intervalmatch (Fec_Timestamp1) LOAD Horario_in, Horario_ou, Depend RESIDENT Horarios;

If you have an KeyField in the load statement  then you should also have the same KeyField in the  intervalmatched data and the intervalmatch() statement. Check out the documentation: https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

View solution in original post

2 Replies
Vegar
MVP
MVP

You have this code:

Left Join (Vtas)
intervalmatch (Fec_Timestamp1) LOAD Horario_in, Horario_ou, Depend RESIDENT Horarios;

If you have an KeyField in the load statement  then you should also have the same KeyField in the  intervalmatched data and the intervalmatch() statement. Check out the documentation: https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

roberto99
Contributor III
Contributor III
Author

Thanks for the help, I have solved the problem