Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

How to convert a single row date range in to multiple rows

Hello All,

Is it possible to split one row in to two  or more rows, what I mean is from the below table data

Split.PNG

if we see, in  the last row the Valid From starts from 15-10-2015 to 02-07-2017 which mean this price is valid in Fiscal year 2017 as well ,so can we split that one row in to multiple rows  I mean

15-10-2015 to 02-07-2017  this date range has to be split like below

                                           Valid From     to        Valid to

                                           15-10-2015   to   30-03-2016          -----FY2016

                                            01-04-2016   to    30-03-2017        -----FY2017

                                             01-04-2017      to  02-07-2017        ---- FY2018

The Data table I have is

Thanks

1 Reply
kunkumnaveen
Specialist
Specialist
Author

Data Table:

LOAD

    MATERIAL AS BFMATERIAL,

    PLANT AS BFPLANT,

    VENDOR AS BFVENDOR,

   Date(VALIDFROM,'DD-MM-YYYY') as BFVALIDFROM,

    Date(VALIDTO,'DD-MM-YYYY') as  BFVALIDTO,

    CALMONTH as BF_CALMONTH,

    //"/BIC/A_INFOCAT",

    "/BIC/K_PRCBUM" as BF_PRICE_MAT,

Year(AddMonths(Date#(CALMONTH,'YYYYMM'),9)) as BFprice_[FiscalYear]

FROM [PRICE.qvd]

(qvd)where match("/BIC/A_INFOCAT",'0') ;