Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

mapping of sales and Target table

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.

4 Replies
ElizaF
Creator II
Creator II

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.


vikasmahajan

Can you attach some sample data in excels.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jagan
Luminary Alumni
Luminary Alumni

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.

Kushal_Chawda

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 ;