Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Expanding column after left join shuffles values in single column

Hi all,    I cant figure out what is going on in the case below. Hope somebody can tell me what I might be doing wrong.    So I merged two tables based on the columns "UOKey" and "RepetitionNr". ...
  • camargos88's avatar
    camargos88
    6 years ago

    Hi Anonymous ,

     

    I just got an ideia...

     

    How about if you Group, Sort and add the index column (those 2 last inside the [Data] column instead of sort / group / index ?

     

    Like:

     

    #"Grouped Rows" = Table.Group(#"Sorted Rows", {"UnitOperationKey"}, {{"Data", each Table.AddIndexColumn(Table.Sort(_,{"StartTime"} ), "SequenceNr", 1,1), type table [UnitOperationKey=text, NoOfRepetitionsOfUO=number, StartTime=datetime, BatchID=text, Unit=text, Label=text, UnitOperation=text, SequenceNr=number]}})