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

Como Somar o Total de Horas na Planilha abaixo

Preciso Soma A diferença das horas.

Exemplo: 

12/01/2019 08:46:30 

menos (-)

12/01/2019 08:48:41

menos(-)

12/01/2019 08:49:22

etc...

Alguma sugestão:

Diferença do primeiro até o ultimo por ordem data e hora

 

DataTipo
12/01/2019 08:46:30Chegando
12/01/2019 08:48:41Saindo
12/01/2019 08:49:22Chegando
12/01/2019 08:54:48Chegando
12/01/2019 08:57:54Chegando
12/01/2019 09:00:09Chegando
12/01/2019 09:02:00Saindo
12/01/2019 09:02:21Saindo
12/01/2019 09:04:34Saindo
12/01/2019 09:08:29Chegando
12/01/2019 09:12:52Chegando
12/01/2019 09:13:03Chegando
12/01/2019 09:21:26Saindo
12/01/2019 09:21:49Saindo
12/01/2019 09:37:12Chegando
12/01/2019 09:37:28Saindo
12/01/2019 09:37:44Chegando
12/01/2019 09:39:18Chegando
12/01/2019 09:41:43Chegando
12/01/2019 09:42:44Chegando
12/01/2019 09:55:56Chegando
12/01/2019 09:56:10Saindo
12/01/2019 09:56:22Chegando
12/01/2019 09:56:49Saindo
12/01/2019 09:57:06Saindo
12/01/2019 09:57:28Saindo
12/01/2019 09:57:42Chegando
12/01/2019 10:00:33Saindo
12/01/2019 10:04:10Saindo
12/01/2019 10:04:34Saindo
12/01/2019 10:04:51Saindo
12/01/2019 10:08:00Saindo
12/01/2019 10:09:42Chegando
12/01/2019 10:14:08Chegando
12/01/2019 10:16:04Chegando
12/01/2019 10:17:22Chegando
12/01/2019 10:17:58Chegando
12/01/2019 10:20:18Chegando
12/01/2019 10:27:47Saindo
12/01/2019 10:28:00Chegando
12/01/2019 10:28:46Saindo
12/01/2019 10:32:43Chegando
12/01/2019 10:33:11Saindo
12/01/2019 10:34:50Chegando
12/01/2019 10:35:28Saindo
12/01/2019 10:36:14Saindo
12/01/2019 10:40:15Saindo
12/01/2019 10:42:10Saindo
12/01/2019 10:43:21Chegando
12/01/2019 10:43:44Saindo
12/01/2019 10:44:25Saindo
12/01/2019 10:44:53Chegando
12/01/2019 10:45:11Chegando
12/01/2019 10:45:24Saindo
12/01/2019 10:45:34Saindo
12/01/2019 10:51:06Chegando
12/01/2019 10:51:40Chegando
12/01/2019 10:52:52Saindo
12/01/2019 11:00:21Chegando
12/01/2019 11:00:34Chegando
12/01/2019 11:05:51Saindo
12/01/2019 11:06:17Saindo
12/01/2019 11:06:48Chegando
12/01/2019 11:07:32Chegando
12/01/2019 11:16:28Saindo
12/01/2019 11:16:39Saindo
12/01/2019 11:18:18Chegando
12/01/2019 11:20:47Chegando
12/01/2019 11:21:03Chegando
12/01/2019 11:23:01Chegando
12/01/2019 11:23:13Saindo
12/01/2019 11:25:04Chegando
12/01/2019 11:30:49Chegando
12/01/2019 11:31:56Saindo
12/01/2019 11:32:07Chegando
12/01/2019 11:32:28Saindo
12/01/2019 11:33:23Saindo
12/01/2019 11:34:57Saindo
12/01/2019 11:37:44Chegando
12/01/2019 11:43:14Chegando
12/01/2019 11:44:16Chegando
12/01/2019 11:49:37Chegando
Neves
7 Replies
Gabriel_Fernandes
Contributor III
Contributor III

Agnaldo,

você pode resolver na carga:

LOAD

Data,
Data-Previous(Data) as Dif,
Tipo

FROM xxxxx

 

depois é só fazer um SUM desse campo.

Ribeiro
Specialist
Specialist
Author

Fiz sua sugestão agora veja que a primeira data ele faz 0,61.

Eu preciso a diferença do primeiro com o segundo, etc.. para somar todas as diferenças.

e depois converter para quantidades de minutos.

Alguma dica?

DataDif
12/01/2019 08:46:300,617315104
12/01/2019 08:48:410,001518588
12/01/2019 08:49:220,000474977
12/01/2019 08:54:480,00377772
12/01/2019 08:57:540,002146181
12/01/2019 09:00:090,001569919
12/01/2019 09:02:000,001280637
12/01/2019 09:02:210,000240718
12/01/2019 09:04:340,001546308
12/01/2019 09:08:290,002709201
12/01/2019 09:12:520,003046991
12/01/2019 09:13:030,000133958
12/01/2019 09:21:260,00581588
12/01/2019 09:21:490,000266343
12/01/2019 09:37:120,010685752
12/01/2019 09:37:280,000186157
12/01/2019 09:37:440,000187153
12/01/2019 09:39:180,001088935
12/01/2019 09:41:430,001673356
12/01/2019 09:42:440,00070081
12/01/2019 09:55:560,009169502
12/01/2019 09:56:100,000163819
12/01/2019 09:56:220,00014103
12/01/2019 09:56:490,00030912
12/01/2019 09:57:060,000201053
12/01/2019 09:57:280,000251748
12/01/2019 09:57:420,000166632
12/01/2019 10:00:330,00197191
12/01/2019 10:04:100,002515706
12/01/2019 10:04:340,00027684
12/01/2019 10:04:510,000191713
12/01/2019 10:08:000,002191771
12/01/2019 10:09:420,001185428
12/01/2019 10:14:080,003078796
12/01/2019 10:16:040,001336991
12/01/2019 10:17:220,000903704
12/01/2019 10:17:580,000413484
12/01/2019 10:20:180,001619167
12/01/2019 10:27:470,005206516
12/01/2019 10:28:000,000143507
12/01/2019 10:28:460,000537164
12/01/2019 10:32:430,002736331
12/01/2019 10:33:110,000328576
12/01/2019 10:34:500,001145
12/01/2019 10:35:280,000442801
12/01/2019 10:36:140,000526111
12/01/2019 10:40:150,002790081
12/01/2019 10:42:100,001337674
12/01/2019 10:43:210,000822488
12/01/2019 10:43:440,000264525
12/01/2019 10:44:250,000475359
12/01/2019 10:44:530,000325208
12/01/2019 10:45:110,000206215
12/01/2019 10:45:240,000148623
12/01/2019 10:45:340,000111829
12/01/2019 10:51:060,003840174
12/01/2019 10:51:400,000393426
12/01/2019 10:52:520,000833021
12/01/2019 11:00:210,005197188
12/01/2019 11:00:340,000157002
12/01/2019 11:05:510,003670787
12/01/2019 11:06:170,000302407
12/01/2019 11:06:480,000355579
12/01/2019 11:07:320,000512037
12/01/2019 11:16:280,006196285
12/01/2019 11:16:390,000133924
12/01/2019 11:18:180,001145336
12/01/2019 11:20:470,001722106
12/01/2019 11:21:030,000185243
12/01/2019 11:23:010,0013686
12/01/2019 11:23:130,000138958
12/01/2019 11:25:040,001277095
12/01/2019 11:30:490,004000845
12/01/2019 11:31:560,000769606
12/01/2019 11:32:070,000125058
12/01/2019 11:32:280,000250185
12/01/2019 11:33:230,000638854
12/01/2019 11:34:570,001086458
12/01/2019 11:37:440,001928519
12/01/2019 11:43:140,003824132
12/01/2019 11:44:160,000712465
12/01/2019 11:49:370,003721065
Neves
danilostochi
Creator II
Creator II

Boa tarde,

veja se isso lhe atende...

Dados:
LOAD * INLINE [
Data, Tipo
12/01/2019 08:46:30, Chegando
12/01/2019 08:48:41, Saindo
12/01/2019 08:49:22, Chegando
12/01/2019 08:54:48, Chegando
12/01/2019 08:57:54, Chegando
12/01/2019 09:00:09, Chegando
12/01/2019 09:02:00, Saindo
12/01/2019 09:02:21, Saindo
12/01/2019 09:04:34, Saindo
12/01/2019 09:08:29, Chegando
12/01/2019 09:12:52, Chegando
12/01/2019 09:13:03, Chegando
12/01/2019 09:21:26, Saindo
12/01/2019 09:21:49, Saindo
12/01/2019 09:37:12, Chegando
12/01/2019 09:37:28, Saindo
12/01/2019 09:37:44, Chegando
12/01/2019 09:39:18, Chegando
12/01/2019 09:41:43, Chegando
12/01/2019 09:42:44, Chegando
12/01/2019 09:55:56, Chegando
12/01/2019 09:56:10, Saindo
12/01/2019 09:56:22, Chegando
12/01/2019 09:56:49, Saindo
12/01/2019 09:57:06, Saindo
12/01/2019 09:57:28, Saindo
12/01/2019 09:57:42, Chegando
12/01/2019 10:00:33, Saindo
12/01/2019 10:04:10, Saindo
12/01/2019 10:04:34, Saindo
12/01/2019 10:04:51, Saindo
12/01/2019 10:08:00, Saindo
12/01/2019 10:09:42, Chegando
12/01/2019 10:14:08, Chegando
12/01/2019 10:16:04, Chegando
12/01/2019 10:17:22, Chegando
12/01/2019 10:17:58, Chegando
12/01/2019 10:20:18, Chegando
12/01/2019 10:27:47, Saindo
12/01/2019 10:28:00, Chegando
12/01/2019 10:28:46, Saindo
12/01/2019 10:32:43, Chegando
12/01/2019 10:33:11, Saindo
12/01/2019 10:34:50, Chegando
12/01/2019 10:35:28, Saindo
12/01/2019 10:36:14, Saindo
12/01/2019 10:40:15, Saindo
12/01/2019 10:42:10, Saindo
12/01/2019 10:43:21, Chegando
12/01/2019 10:43:44, Saindo
12/01/2019 10:44:25, Saindo
12/01/2019 10:44:53, Chegando
12/01/2019 10:45:11, Chegando
12/01/2019 10:45:24, Saindo
12/01/2019 10:45:34, Saindo
12/01/2019 10:51:06, Chegando
12/01/2019 10:51:40, Chegando
12/01/2019 10:52:52, Saindo
12/01/2019 11:00:21, Chegando
12/01/2019 11:00:34, Chegando
12/01/2019 11:05:51, Saindo
12/01/2019 11:06:17, Saindo
12/01/2019 11:06:48, Chegando
12/01/2019 11:07:32, Chegando
12/01/2019 11:16:28, Saindo
12/01/2019 11:16:39, Saindo
12/01/2019 11:18:18, Chegando
12/01/2019 11:20:47, Chegando
12/01/2019 11:21:03, Chegando
12/01/2019 11:23:01, Chegando
12/01/2019 11:23:13, Saindo
12/01/2019 11:25:04, Chegando
12/01/2019 11:30:49, Chegando
12/01/2019 11:31:56, Saindo
12/01/2019 11:32:07, Chegando
12/01/2019 11:32:28, Saindo
12/01/2019 11:33:23, Saindo
12/01/2019 11:34:57, Saindo
12/01/2019 11:37:44, Chegando
12/01/2019 11:43:14, Chegando
12/01/2019 11:44:16, Chegando
12/01/2019 11:49:37, Chegando
];

dados2:
LOAD
interval(Timestamp(Data,'DD/MM/YYYY hh:mm:ss')-Timestamp(Previous(Data),'DD/MM/YYYY hh:mm:ss'),'hh:mm:ss') as Dif,
Data,
Tipo
Resident Dados;
DROP Table Dados;

//após isso basta fazer =sum(Dif) no report

+55(44) 9 9993-3605, WhatsApp
E-Mail or Skype - danilo16stochi@hotmail.com
Gabriel_Fernandes
Contributor III
Contributor III

Coloca assim na carga:

 

LOAD
Data,
if(RowNo()=1,0,Data-Previous(Data)) as Dif,
Tipo
FROM

ai ó só somar e formatar:

Time(Sum(Dif))

pedromsouza
Creator II
Creator II

Segue minha sugestão:

geral por FirstSortedValue e "data a data" com above. 

Vou anexar o QVW. 

Qliking since '09
Ribeiro
Specialist
Specialist
Author

08:46:29 - 08:48:40 :  2,11 minutos

08:48:40 - 08:49:21:   1,21 minutos

Total: 3:31 minutos

Preciso fazer algo parecido está igual a figura

 

2019-04-12_10-13-44.png

Neves
Ribeiro
Specialist
Specialist
Author

Tem como você enviar o set analysis para mim. Personal editor

Neves