Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help to solve this model relations!!

Hi guys could some body please help me to solve this model?

Tanks!!

4 Replies
Sokkorn
Master
Master

Hi,

Here is my suggestion:

[Objetivos]:

LOAD

     IDPais                            AS [_IDPais],

     IDProducto                        AS [_IDProducto],

     IDProducto &'|'& IDProducto    AS [_Key],

     IDPais,

     IDProducto,

     Mes,

     Año,

     Cantidad

FROM

[Info ejemplo cruso QV.xlsx]

(ooxml, embedded labels, table is Objetivos);

Left Join ([Objetivos])

LOAD

     IDProducto &'|'& IDProducto    AS [_Key],

     IDProducto,

     IDCliente                        AS [_IDCliente],

     IDPedido,

     Cantidad                    as Cantidad_Ventas,

     Fecha

FROM

[Info ejemplo cruso QV.xlsx]

(ooxml, embedded labels, table is Ventas);

Left Keep([Objetivos])

LOAD IDCliente    AS [_IDCliente],

     Cliente,

     IDPais

FROM

[Info ejemplo cruso QV.xlsx]

(ooxml, embedded labels, table is Clientes);

Left Keep([Objetivos])

LOAD IDPais    AS [_IDPais],

     País

FROM

[Info ejemplo cruso QV.xlsx]

(ooxml, embedded labels, table is País);

Left Keep([Objetivos])

LOAD IDProducto    AS [_IDProducto],

     Producto

FROM

[Info ejemplo cruso QV.xlsx]

(ooxml, embedded labels, table is Productos);

See sample attached file.

Regards,

Sokkorn

Not applicable
Author

Hi Sokkorn

when you select the field "Pais" it does not work with the rest of fields.

Not applicable
Author

Hola Javier,

Remember in QlikView you can easily use CONCATENATE and JOIN tables.

Don't use opetrational model BUT decisional model

So i would rather JOIN clientes on Ventas, same with Produtos.

You don't need table Pais.

Don't forget to use MAPPING.

In your case, you may work with 1 or 2 tables

Chris

Not applicable
Author

Hi Javier

Not knowing your dataset I avoided using joins etc and went for a Linked Table approach.

See attached example.

Thanks

Zohaib