Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Kinldy Help Me.. I am new in qlikview. and i need help to map sales and target tables.
I have two sales fact table.
Primary Sales:
Load
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Primary Sales,
"PrimaryStore"
SalesDate
from PrimarySales ;
Concatenate([Primary Sales])
Load
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Secondary Sales,
"SecondaryStore"
SalesDate
from SecondarySales ;
And i have two Separate Target Table that Contain daily target amount storewise:
PrimaryTarget:
LOAD
"TargetDate" ,
"PrimaryStore" ,
"Target Budget"
from PrimaryTarget;
concatenate(PrimaryTarget)
SecondyTarget:
LOAD
"TargetDate" ,
"SecondaryStore" ,
"Target Budget"
from SecondaryTarget;
so how to map sales and Target...
i am connecting sales and target store wise but in sales date i am creating calandar. but how to handle target date.
Hello,
There are many solutions:
1. To create a Link Table between Sales table and Target table.
2. Concatenate Sales table and Target table
3. Use applymap function.
For applymap function, see below the example who to use
PrimaryTargetMap:
Mapping
LOAD
TargetDate,
[Target Budget]
from PrimaryTarget;
SecondyTargetMap:
Mapping
LOAD
TargetDate,
[Target Budget]
from SecondaryTarget;
Primary Sales:
Load
ApplyMap('PrimaryTargetMap',SalesDate,Null()) as PrimaryTarget,
ApplyMap('SecondyTargetMap',SalesDate,Null()) as PrimaryTarget,
.....
Hope this helps.
Can you attach some sample data in excels.
Vikas
Hi,
Try this
Primary Sales:
Load
AutoNumber(SalesDate& PrimaryStoreAS Key,
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Primary Sales,
"PrimaryStore"
SalesDate
from PrimarySales ;
Concatenate([Primary Sales])
Load
AutoNumber(SalesDate& SecodaryStore) AS Key,
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Secondary Sales,
"SecondaryStore"
SalesDate
from SecondarySales ;
And i have two Separate Target Table that Contain daily target amount storewise:
PrimaryTarget:
LOAD
AutoNumber(TargetDate & PrimaryStore) AS Key,
"TargetDate" ,
"PrimaryStore" ,
"Target Budget"
from PrimaryTarget;
concatenate(PrimaryTarget)
SecondyTarget:
LOAD
AutoNumber(TargetDate & SecodaryStore) AS Key,
"TargetDate" ,
"SecondaryStore" ,
"Target Budget"
from SecondaryTarget;
Regards,
Jagan.
PrimaryTarget_map:
mapping LOAD
TargetDate&PrimaryStore as Key
Target Budget
from PrimaryTarget;
SecondaryTarget_map:
mapping LOAD
TargetDate&SecondaryStore as Key
Target Budget
from PrimaryTarget;
Primary Sales:
Load
applymap('PrimaryTarget_map',SalesDate&PrimaryStore,'NA') as Budget
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Primary Sales as Sales,
PrimaryStore as Store,
'PrimarySales' as Flag
SalesDate
from PrimarySales ;
Concatenate([Primary Sales])
Load
applymap('SecondaryTarget_map',SalesDate&SecondaryStore,'NA') as Budget
DocumentId,
ItemId,
ItemCategoryCode,
ProductCategoryCode,
VariantCode,
Secondary Sales as Sales,
SecondaryStore as Store
SalesDate,
'SecondarySales' as Flag
from SecondarySales ;