14 Replies Latest reply on May 2, 2019 2:50 PM by calder pegden

    combine data from multiple rows in a single column into a single field: Tableau Prep

    calder pegden

      We have an application that gets event data sent to it via csv import. There are 2 different types of events, single and recurring. Most of the recurring events are already formatted correctly but at times we have recurring events that are recorded in the csv's as single events (same name, multiple dates). To do this combine the starts_at and ends_at fields into a single string field "child_time" (which i have already done as shown below) and then i need to combine all the child_time fields from an event with the same name into a list in a single field child_times.

       

      I have a table that looks like the following

       

      namechild_time
      Event 1{"starts_at":"2019-05-01T00:00:00-000","ends_at":"2019-05-01T04:00:00-000"}
      Event 1{"starts_at":"2019-05-8T00:00:00-000","ends_at":"2019-05-8T04:00:00-000"}
      Event 1{"starts_at":"2019-05-15T00:00:00-000","ends_at":"2019-05-15T04:00:00-000"}
      Event 2{"starts_at":"2019-04-01T05:00:00-000","ends_at":"2019-05-01T09:00:00-000"}
      Event 2{"starts_at":"2019-04-02T05:00:00-000","ends_at":"2019-05-02T09:00:00-000"}

       

      which i would like to turn into

       

       

      namechild_times
      Event 1{"starts_at":"2019-05-01T00:00:00-000","ends_at":"2019-05-01T04:00:00-000"},{"starts_at":"2019-05-8T00:00:00-000","ends_at":"2019-05-8T04:00:00-000"},{"starts_at":"2019-05-15T00:00:00-000","ends_at":"2019-05-15T04:00:00-000"}
      Event 2{"starts_at":"2019-04-01T5:00:00-000","ends_at":"2019-05-01T09:00:00-000"},{"starts_at":"2019-04-02T05:00:00-000","ends_at":"2019-05-02T09:00:00-000"}

       

       

      is this possible using tableau prep?