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

Group when loading table / Agrupar al momento de cargar tabla

Dear:

I have an existential doubt when loading a table in my model QlikView.

I want to load a table like this:

OrderCreation DateCreation TimeType
15021166901/07/20168:34:52FR
15021167001/07/20168:45:17FR
15021167101/07/20169:00:57NU
15021167201/07/20169:01:01AM
15021169401/07/20169:24:37FR
15021169401/07/20169:24:38CC
15021170601/07/20169:44:43FR
15021170601/07/20169:44:43AM


But I need to be loaded in this way:

OrderCreation DateCreation TimeType
15021166901/07/20168:34:52FR
15021167001/07/20168:45:17FR
15021167101/07/20169:00:57NU
15021167201/07/20169:01:01AM
15021169401/07/20169:24:37FR
15021170601/07/20169:44:43FR

I try to explain.

An order can have records of a type or many

if a request has two or more different types and one of them is FR,

that all other records are removed leaving only the belonging to FR,

if does not have any record with FR type, it is the same.

I hope you understood my problem

Beforehand thank you very much.


-----------------------------------------------------------------------------------------------------------------------------------


Estimados:

Tengo una duda existencial al momento de cargar una tabla en mi modelo QlikView.

Deseo cargar una tabla similar a esta:

PedidoFecha CreaciónHora CreaciónTipo
15021166901/07/20168:34:52FR
15021167001/07/20168:45:17FR
15021167101/07/20169:00:57NU
15021167201/07/20169:01:01AM
15021169401/07/20169:24:37FR
15021169401/07/20169:24:38CC
15021170601/07/20169:44:43FR
15021170601/07/20169:44:43AM

Pero necesito que se cargue de esta manera:

PedidoFecha CreaciónHora CreaciónTipo
15021166901/07/20168:34:52FR
15021167001/07/20168:45:17FR
15021167101/07/20169:00:57NU
15021167201/07/20169:01:01AM
15021169401/07/20169:24:37FR
15021170601/07/20169:44:43FR

Trataré de explicarlo.

Un pedido puede tener registros de un Tipo o de muchos

si un pedido posee dos o mas tipos distintos y uno de ellos es FR,

que se eliminen los demás registros dejando solamente el perteneciente a FR,

si no posee ningún registro con tipo FR, que quede igual.

Espero que se haya entendido mi problema

De antemano muchas gracias.

Mensaje editado por: Felipe Gonzalez

2 Replies
Gysbert_Wassenaar

Try this:

Table1:

LOAD

     Order,

     [Creation Date],

     [Creation Time],

     Type

FROM

     ...source_table...

WHERE

     Type = 'FR'

     ;

CONCATENATE (Table1)

LOAD

     *

FROM

     ...source_table...

WHERE

     NOT EXISTS(Order)

     ;


talk is cheap, supply exceeds demand
felipessj
Contributor III
Contributor III
Author

Follow your guide at the end but I was more when reading the database, thank you very much

- - -

al final segui tu guía pero me fui mas al momento de leer la base de datos, muchas gracias

Note: Edited by Community Moderator to include English translation as a courtesy.