Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;
Try With Mapping Prefix and ApplyMap
Thanks Rudolph ,
Can you please tell me this in detail ?
Rudolph i guess that u r trying to create new table from above script .
I want to include field of one table into another
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;
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.
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,