Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Load calculated dimension with fields from two tables in the script

Hi Community,  I have a calculated dimension of: if(leafhdrtxt=[Division Abbreviation],[Division Abbreviation])  The two fields come from two different tables.  How would I try to load this in a script to get a regular field, like: if(leafhdrtxt=[Division Abbreviation],[Division Abbreviation]) as CalcLessField?

5 Replies
Not applicable

Load calculated dimension with fields from two tables in the script

It occurs to me to make a join of one of the tables with data from another table. This way you have the fields in one table and you do what you want.

TableA:

SQL Select *

From A;

TableB:

SQL Select *

From B;

Join (TableA)

Load *

Resident TableB;

In this way have in TableA TableB fields.

Not applicable

Load calculated dimension with fields from two tables in the script

So when I do the join above, where do I put the calculated dimension?  I tried putting it in the load of the join statement, but it said I was missing the field that is from table B.

Not applicable

Load calculated dimension with fields from two tables in the script

After making the join can use all the fields in Table A and make the necessary calculations in Table A because there you have all the fields (Table A and Table B).

A greeting.

PD: pardon my english.

Not applicable

Load calculated dimension with fields from two tables in the script

All the tables in this document come from QVDs.  Is there anyway to do the join still?  If so please give me some example syntax.

Ive tried loading the calculated dimension but it always says that the field which is not in the table is missing.

Here is what I have in my document:

TableA:

Load * //not sql select

From A;

TableB:

Load * //not sql select

From B;

Join (TableA)

Load *

Resident TableB;

Not applicable

Load calculated dimension with fields from two tables in the script

TableA:

Load * //not sql select

From A;

TableB:

Load * //not sql select

From B;

Join (TableA)

Load *

Resident TableB;

FinalA:

Load

     CalculatedColumn,

     ColumnA1,

     ColumnA2,   

     ......

Resident TableA;

Drop Table TableA;

Is posible that is necesary use reserved word noconcatenate. Ej.

FinalA:

Load

     NOCONCATENATE

     CalculatedColumn,

     ColumnA1,

     ColumnA2,   

     ......

Resident TableA;

Drop Table TableA;

Community Browser