Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to pivot the data contain dates change over week

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2014
    Posts
    8

    Question How to pivot the data contain dates change over week

    Hi ,
    I have below data where i want to covert rows to columns. Dates should be added as a column and respected qty to date. Please Note that date is not fixed , it changes every week, so we cannot consider dates as constant.
    input :
    Part Location Date Qty
    2 788-5000 2017-10-16 0
    2 788-5000 2017-11-13 0
    2 788-5000 2017-12-11 0
    3339 895-0696-000 2018-04-02 0.5
    3339 895-0696-000 2018-04-30 0.3
    3701 895-0696-000 2018-03-05 0.5
    3701 895-0696-000 2018-04-02 0.5
    18463 895-0696-000 2017-10-16 0.1
    18463 895-0696-000 2017-11-13 0.1
    18463 895-0696-000 2017-12-11 0.1
    18463 895-0696-000 2018-01-08 0.1
    18463 895-0696-000 2018-02-05 0.1
    18463 895-0696-000 2018-03-05 0.1
    0000000DD461 895-0696-000 2018-02-05 0.1


    I want below output .

    Part Location 2017-10-16 2017-11-13 2017-12-11 2018-01-08 2018-02-05 2018-03-05 2018-04-02 2018-04-30
    2 788-5000 0 0 0
    3339 895-0696-000 0.5 0.3
    3701 895-0696-000 0.5 0.5
    18463 895-0696-000 0.1 0.1 0.1 0.1 0.1 0.1
    0000000DD461 895-0696-000 0.1



    I am attaching input and output files for reference.
    Thanks in advance
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.