Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Strange values after join

Hi!

I have following problem. To calculate some values I needed to join two tables. My script looks like that:

[Asortyment]:

LOAD SymKar,

     SymKar2,

     Cecha,

     Firma,

     FirmaLokalizacja,

     GrupaCen,

     NazwaProdukt,

     NazwaProdukt2,

     GrupaCenNazwa,

     GrupaCenId,

     GrupaAsortymentNazwa,

     GrupaAsortymentId,

     TypProduktu,

     pd_S1,

     pd_S2,

     pd_S3,

     pd_S4,

     pd_S5,

     pd_S6,

     pd_S7,

     pd_S8,

     pd_S9,

     pd_S10,

     CenaDetal,

     TKW,

     Kolor

FROM

[qlikview_dane_testowe.xlsx] (ooxml, embedded labels, table is Asortyment);

[Faktury_temp]:

LOAD NumerDok,

     DataPlat,

     Date([DataSprz], 'YYYY-MM-DD') as [Data Sprzedaży],

     Month([DataSprz]) as [Miesiac],

     Year([DataSprz]) as [Rok],

     Logo,

     SymKar,

     IloscMGPrzel,

     Ilosc,

     Brutto,

     Netto,

     WartoscExWorks,

     WartoscExWorks / IloscMGPrzel as Cena_Przel,

     WartoscExWorks / Ilosc as Cena_Normalna,

     TypPlat,

     SymRej

FROM

[qlikview_dane_testowe.xlsx] (ooxml, embedded labels, table is Faktury);

LEFT JOIN LOAD

    SymKar,

    TKW

Resident [Asortyment];

[Faktury]:

LOAD *,

     TKW * Ilosc as [Koszt calkowity]

RESIDENT [Faktury_temp];

DROP TABLE [Faktury_temp];

I load data to asortyment, then I load faktury_temp and join it with asortyment, and then I calculate final value I need: TKW.

It is calculated correctly, but now there is sth wrong in my data.

As you can see only one Netto is selected, and only one NumerDok possible, but statistic boxes shows that there are 24 things selected! Also sum of Netto is multiplied by 24. When I exported all data to flat file using script from here:

QlikView Maven: Export All Data From All QV Tables to Text Files

I also see this values 24 times (everything is the same in every row).

What can I do?

Best regards,

Greg

1 Solution

Accepted Solutions
Not applicable
Author

Hi!

Help no longer neded - resolved myself by loading distinct values at last step.

Best regards

Greg

View solution in original post

1 Reply
Not applicable
Author

Hi!

Help no longer neded - resolved myself by loading distinct values at last step.

Best regards

Greg