Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

sushil353
Honored Contributor II

how do i concat multiple fact table with same field with a flag?

Hi All,

I have two fact table

table one:

location_code

area_code

time_id

defects

processed

table two;

location_code

area_code

time_id

defects

processed

failure

and dimensions are time,location and area

how would i concat them into a single table such that after concating i am able to know which field is from which table....(means how do i add flag)

Please help me out...

Thanks

4 Replies
gandalfgray
Valued Contributor

Re: how do i concat multiple fact table with same field with a flag?

Hi Sushil

NewTable:

Load 'Table one' As SourceTable,

     location_code,

     area_code,

     time_id,

     defects,

     processed

Resident [table one];

Concatenate (NewTable)

Load 'Table two' As SourceTable,

     location_code,

     area_code,

     time_id,

     defects,

     processed,

     failure

Resident [table two];

Drop Tables [table one], [table two];

The field SourceTable shows where the data came from

hth/gg

Not applicable

Re: how do i concat multiple fact table with same field with a flag?

So you basically want to a full list of 'location_code' from both tables for example but still see which it came from originally?

I think you should just be able to add an identifer to each table before you concat them

so

table one:

load

location_code,

area_code,

time_id,

defects,

processed,

'table one' as Table_Flag

same for table two and then concat

hope that helps

Joe

edit: in the time of writing that GG beat me to it!

sushil353
Honored Contributor II

how do i concat multiple fact table with same field with a flag?

Hi GG..

Thanks

Is it required to keep table name in single quotes

as my table name is PRD_YIELD_OP_TYPE_SUMMARY

so i am doing like

'PRD_YIELD_OP_TYPE_SUMMARY' as sourcePrdYield

gandalfgray
Valued Contributor

how do i concat multiple fact table with same field with a flag?

Yes the quotes are required,

otherwise QV will look for a field named PRD_YIELD_OP_TYPE_SUMMARY

in your source.

/gg

Community Browser