Forum Discussion

MrTD's avatar
MrTD
Frequent Visitor
9 years ago
Solved

Building a path based of column data in Power Query

Hey, I need to build a table in Power BI (preferably in Power Query) based of dates.  I want to create a series of data in a column (I can split it later) where the ID is the same. Poorly explaine...
  • MarcelBeug's avatar
    9 years ago

    Prerequisite: column OtherData is in text format.

     

    I used option "Group By" with operation "All Rows" and adjusted the code to have the resulting tables (1 per ID) sorted by DateTime, and OtherData combined to 1 CSV string.

     

    Edit: "1 table per ID" is during the Group By operation. The end result is 1 table in total.

     

    let
        Source = Table1,
        #"Grouped Rows" = Table.Group(Source, {"ID"}, {{"data", each Text.Combine(Table.Sort(_, "DateTime")[OtherData],","), type text}})
    in
        #"Grouped Rows"

     

    Not sure if this will perform well, with 7 million rows...