Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rajkumarb
Creator II
Creator II

Look-Up Table

HI Experts

I have a Promotions look-Up Table in this, there will be a list of products with their Id for promotion with start date and end date, this Table changes weekly,

I have a main table and I want to create a new field called From-to Date & pick the sales on this particular promotion only, How Can I Do this


Promotions_Table:

LOAD * INLINE [

    Week, From_Date, To_Date, ProductID, Description

    2, 08/01/2015, 13/01/2015, 70980, Spray

    2, 08/01/2015, 13/01/2015,70010, Gloves Small

    2, 08/01/2015, 13/01/2015, 70020, Latex Gloves

    2, 08/01/2015, 13/01/2015, 70030, BiG Gloves

    2, 08/01/2015, 13/01/2015, 70040, XL Latex Gloves

    2, 08/01/2015, 13/01/2015,70060,  Small Latex Gloves

    2, 08/01/2015, 13/01/2015,70070, Med Latex Gloves

    2, 08/01/2015, 13/01/2015, 70080,  Larg Latex Gloves

    2, 08/01/2015, 13/01/2015,70090,  XL Latex Gloves

    2, 08/01/2015, 13/01/2015, 72080, Nitrile Gloves Small

    2, 08/01/2015, 13/01/2015, 72090,  Nitrile Gloves Medium

    2, 08/01/2015, 13/01/2015,72100,  Nitrile Gloves Large

    2, 08/01/2015, 13/01/2015,72110,  Nitrile Gloves Xlarge

    3, 15/01/2015, 19/01/2015, 76031,  FS

    3, 15/01/2015, 19/01/2015, 70090,Absorbent 10Ltr

    3, 15/01/2015, 19/01/2015,2881, Cover

    3, 15/01/2015, 19/01/2015, 70770, Granules

    3, 15/01/2015, 19/01/2015, 70900, boot kit

];

Main_Table:

LOAD Branch,

     DATE(Dates, 'DD/MM/YYYY') AS SALEDATE,

     MONTH(Dates) AS SaleMONTH,

      YEAR(Dates) AS SaleYEAR,

     Name,

     PartNo,

     Description,

     Sales,

     Quantity

FROM

[QVD\ Main_Table.qvd]

(qvd);

Thanks In Advance

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this blog post: Creating Reference Dates for Intervals


talk is cheap, supply exceeds demand
rajkumarb
Creator II
Creator II
Author

Thank You 

Gysbert Wassenaar