Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Field Name

ow to bring the field name of one table into anohter table

Detail there are 2 table name , Finance and Sales .

from sales table i want to take a field name " SaleDate" into Finance table .

and under Finace table i have Booking date .

AFter including SalesDate into FInance table , I want an field which will be (SaleDate-Booking Date )

Can someone guide me how do we get this ?

Thanks in advance

7 Replies
Anonymous
Not applicable

you may use a join, something like below

maybe you need to Format your fields

left join(Finance)

load

  uniquekey,

  SaleDate

resident Sales;

Tmp:

load *,

SalesDate-BookingDate as Days

resident Finance;

Anil_Babu_Samineni

Try With Mapping Prefix and ApplyMap

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
smilingjohn
Specialist
Specialist
Author

Thanks Rudolph ,

Can you please tell me this in detail ?

smilingjohn
Specialist
Specialist
Author

Rudolph i guess that u r trying to create new table from above script .

I want to include field of one table into another

Anonymous
Not applicable

to help you more in detail paste script of your tables

instead creating Tmp table you may also use directly.

left join(Finance)

load *,

SalesDate-BookingDate as Days

resident Finance;

Digvijay_Singh

If you have common key then Create mapping table after sales table load and before finance table load as -

salesdatemap:

Mapping load

ID, SaleDate

Resident Sales table;

Now while loading finance table use applymap  to get saledate from map table-

applymap('salesdatemap',ID,'NA') as SaleDate;

If matching ID is not available in sales table then it will return NA if third parameter is used else ID will be returned for unmatched IDs.

jayaseelan
Creator III
Creator III

Hi john,

   what is the link field you have between Finance and Sales tables.?

Using that you can use joins or applymap or keep concepts.

https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/Scripting/combine-tables-join-keep.htm

https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/Scripting/MappingFunctions/ApplyMap.htm

refer above links.

Hope will helps you

Thanks,