Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
kunkumnaveen
Valued Contributor

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
Valued Contributor

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

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') ;