Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Unite identical neighboring rows

Hello, 

 

I would like to combine rows that are identical and neighboring, see example below.  

 

 

 

The order of the entries matters, since they have been listed chronologically. 
Removing duplicates doesn't work, since the blue and grey rows are identical yet not neighboring.

 

I'd be grateful for any ideas how this could be solved :)

 

Kind regards, 

Jama1234

 

 

 

 

 

 

 

  • Anonymous 

     

    Hi

     

    Select all the 3 columns>>>From the Transform Tab>>Group BY.

    In the formula bar, just modify the formula by adding the text in red font below

     

    = Table.Group(#"Changed Type", {"ID", "State", "Previous State"},
     {{"ALL", each _, type table [ID=text, State=text, Previous State=text]}},GroupKind.Local)

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Hi

     

    Select all the 3 columns>>>From the Transform Tab>>Group BY.

    In the formula bar, just modify the formula by adding the text in red font below

     

    = Table.Group(#"Changed Type", {"ID", "State", "Previous State"},
     {{"ALL", each _, type table [ID=text, State=text, Previous State=text]}},GroupKind.Local)
    • Anonymous's avatar
      Anonymous
      Not applicable

      Works perfectly! :smileyvery-happy: Thank you