Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

wale_martins
Not applicable

QLIKVIEW LOOPS PROBLEM

Hi all,

Could someone solve my problem with that loop (cod_producto)?

Thank you in advance!

Tags (1)
1 Solution

Accepted Solutions
wale_martins
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

Dear All,

I've finally solved my problem, creating a linktable. I don't know if it's the best solution, but know I'm able to get product prices and also product discounts.

LinkTable:

Load

Cod_Producto,

Grupo_Precio_Venta

resident BD_PRECIO;

Concatenate(LinkTable)

Load

Cod_Producto,

Grupo_Descuento

resident BD_DESCUENTO;

Regards

Wale

5 Replies
mwoolf
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

In the load script for BD_PRECIO,

Cod_Producto as BP_Cos_Producto   (or any other name that doesn't match another field)

wale_martins
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

Thank you for your quick response. I had already done that.... the problem is that when I try to filter a cliente from BD_Cliente I can't get the correct precio from BD_Precio (I get all precio results)

Any other solution?

Thank you very much m w

Digvijay_Singh
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

Somehow you need to break the loop and the exact location where we should break the loop is normally indicated from business meaning of the fields.

If Cod_Producto in BD_PRECIO is not the right field to rename then what if we rename Grupo_Descuento... in BD_DESCUENTO to break the loop?

You may want to build star schema model by concatenating or joining tables to simplify your data.

wale_martins
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

Thank you very much Digvijay Singh

The problem is that I can't either break the loop in BD_DESCUENTO. I need both tables to be related with cod_producto.

Table DESCUENTO brings me all the discounts that each "cod_producto" have and table PRECIO brings me all the prices that each "cod_product" also have...

I have to change the script... but I don't know how...

Regards

Wale

wale_martins
Not applicable

Re: QLIKVIEW LOOPS PROBLEM

Dear All,

I've finally solved my problem, creating a linktable. I don't know if it's the best solution, but know I'm able to get product prices and also product discounts.

LinkTable:

Load

Cod_Producto,

Grupo_Precio_Venta

resident BD_PRECIO;

Concatenate(LinkTable)

Load

Cod_Producto,

Grupo_Descuento

resident BD_DESCUENTO;

Regards

Wale