Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Joining tables

I Have:

Expenses_CarKm:

  load

  YearMonth,

  YearMonth & ProfitKmCarNumber As YearMonthCar,

  (ProfitKmEnd - ProfitKmStart) As ProfitKmTotal,

  ProfitKmDrive As ProfitKmDrive,

  (ProfitKmEnd - ProfitKmStart) - ProfitKmDrive As ProfitKmEmpty;

from excel file

And I Have:

TESTING:

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

how do i join Expenses_CarKm and Testing??

5 Replies

Re: Joining tables

Using the JOIN keyword:


Expenses_CarKm:

  load

  YearMonth,

  YearMonth & ProfitKmCarNumber As YearMonthCar,

  (ProfitKmEnd - ProfitKmStart) As ProfitKmTotal,

  ProfitKmDrive As ProfitKmDrive,

  (ProfitKmEnd - ProfitKmStart) - ProfitKmDrive As ProfitKmEmpty;

from ...excel_file...;

JOIN (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);


talk is cheap, supply exceeds demand
Not applicable

Re: Joining tables

I alredy loaded the first excel table in different place and i called it Expenses_CarKm

and i don't want to load it again.

i just want to join

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

with Expenses_CarKm fileds.

joshabbott
Contributor III

Re: Joining tables

Join (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

mohamed_ahid
Contributor III

Re: Joining tables

Hi

try this :

TESTING:

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

join(TESTING)

  load

  YearMonth,

  YearMonthCar,

  ProfitKmTotal,

  ProfitKmDrive,

  ProfitKmEmpty;

resdient  Expenses_CarKm;

Hope it helps

Not applicable

Re: Joining tables

Hi,

It"s not a problem.. the both tables should exists in the script... then use join  keyword for joining your table like below

Join (Expenses_CarKm)

LOAD YearMonth,

     [מספר רכב] As ProfitMainCarNumber,

     [סה"כ עלות] As ProfitMainTotal

FROM

(ooxml, embedded labels, table is [תחזוקה וחלפים]);

Community Browser