Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: how to merge columns if they are same value like groups

  1. #1
    Join Date
    Feb 2010
    Posts
    114

    Question how to merge columns if they are same value like groups

    Dear All,

    I want to make following report but how i merge column if query having duplicate data

    my query result :-

    srno itemname availabilitydate purchasedate
    one 1. item1 Monday , 9th July 2012 Monday , 9th June 2012
    one 2. item2 Monday , 18th July 2012 Monday , 18th June 2012
    two 1. item3 Monday , 29th July 2012 Monday , 19th June 2012
    two 2. item4 Monday , 18th July 2012 Monday , 28th June 2012
    etc.....


    Pentaho Output required :-

    Sr. No. Item Name Availability date Purchase date
    One
    1. Item1
    } Monday , 9th July 2012
    Tuesday , 18th July 2012
    Monday , 9th June 2012
    Tuesday , 18th June 2012
    1. Item2
    Two
    1. Item3
    }
    Monday , 29th July 2012
    Tuesday , 18th July 2012
    Monday , 19th June 2012
    Tuesday , 28th June 2012
    1. Item4
    1. Item5
    Three
    1. Item16
    }
    Monday , 11th July 2012
    Tuesday , 18th July 2012
    Monday , 12th June 2012
    Tuesday , 8th June 2012

  2. #2
    Join Date
    Jun 2007
    Posts
    476

    Default

    If I understand correctly, you want to only show once the srno when it repeats? If so, then you have to play with the HASCHANGED formula expression in the visible style of the field.

    Put the field in the details section, then search for the visible style and add the formula following expression (in the + sign):

    =IF(HASCHANGED("srno");true;false)

    This basically sents true the visible style i the field srno is different from the previous row and false if it's the same, making the field only visibile when it shows for the first time.
    Rodrigo Haces
    TAM / Enterprise Architect
    Pentaho

  3. #3
    Join Date
    Sep 2011
    Posts
    152

    Default

    You can also do it by using function as : go to function inside report add Hide Repeating(Item Hide function) and then in visibility of the item for which you don't want to repeat write =IF([ItemHideFunction0]="false";"false";"true")

    it will hide all your repeating values.

    Thanks

  4. #4
    Join Date
    Mar 2008
    Posts
    364

    Default

    Quote Originally Posted by rajeshbcrec View Post
    ... write =IF([ItemHideFunction0]="false";"false";"true")
    whis is the same as =[ItemHideFunction0]

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.