Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Cross table mapping with calculation.

Dears,

Would you please suggest how can I do such calculation.

     There is a cross table with the data, it has dimensions in the first column and in the first row (period) of  cross table, and the value inside the matrix.

                              Number \ Period

                                                       DATA1

     Next, I'd like to map this data with simple table likes

                         Period | DATA2

  Is it possible to get the calculated value NEW as DATA1*DATA2 during the loading of script?

Thank you for any advices.

KR

Dmitry

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Cross table mapping with calculation.

Hi,

Convert the First table from Matrix to Table for using CROSS TABLE option in Qlikview.

Now join the two tables

TempData:

Crosstable (Number, Period) Load * from DataSource1;

LEFT JOIN (TempData)

LOAD

     Period,

     DATA2

FROM DataSource;

Data:

LOAD

*,

    DATA1 * DATA2 AS Value

FROM TempData;

DROP TABLE TempData;

Hope this helps you.

Regards,

Jagan.

View solution in original post

4 Replies
MVP & Luminary
MVP & Luminary

Cross table mapping with calculation.

Hi,

Convert the First table from Matrix to Table for using CROSS TABLE option in Qlikview.

Now join the two tables

TempData:

Crosstable (Number, Period) Load * from DataSource1;

LEFT JOIN (TempData)

LOAD

     Period,

     DATA2

FROM DataSource;

Data:

LOAD

*,

    DATA1 * DATA2 AS Value

FROM TempData;

DROP TABLE TempData;

Hope this helps you.

Regards,

Jagan.

View solution in original post

Not applicable

Cross table mapping with calculation.

Hi Jagan,

Would you please check my example, I've got some problem with the Loading the scrip in the end. And I can't see my table through the table viewer. 

Sript is below:

// Temporary cross table load

 

TempTG:

CrossTable(Month, TGT)

LOAD * FROM

(ooxml, embedded labels, table is TG);

   // Combine two tables

 

LEFT JOIN (TempTG)

LOAD * FROM

(ooxml, embedded labels, table is Cos);

Data:

LOAD *, TGT*Total as Value FROM TempTG;

DROP TABLE TempTG;

it's looking for a file - TempTG instead of table.

Cannot open file 'C:\Documents and Settings\rumfprusakod\Desktop\QlikView files\QV_Database\TempTG'

Data:

LOAD *, TGT*Total as Value

FROM TempTG

Thank you

KR

Dmitry

MVP & Luminary
MVP & Luminary

Cross table mapping with calculation.

Hi,

Data:

LOAD *, TGT*Total as Value RESIDENT TempTG;

Use resident instead of From.

Hope this helps you.

Regards,

Jagan.

Cross table mapping with calculation.

Hi,

     You should use Resident instead of From while using the table that loaded already.

     In this one

    

Data:

LOAD *, TGT*Total as Value FROM TempTG;

Change it to

    

LOAD *, TGT*Total as Value RESIDENT TempTG;

Celambarasan