Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Grouping

Hello, I have a table with the following columns:

1. Operation Id

2. Id Paso

3. Date

I need to get a table grouped by Operation ID, getting the most recent date and its respective Step ID. When I try to filter by most recent date in data transformation I get the most recent row (1 row) and not for each operation.

I would greatly appreciate the support

  • Hi aperezd 

     

    Do you want something like this? 

     

    First group by operation id column and add two new columns as below. The Latest Date column will return the latest date for every operation id. 

     

    Then expand the All Rows column and select only necessay columns to expand. 

     

    Add a step to filter rows where [Date] = [Latest Date].

     

    Remove Latest Date column if it's not needed any longer. I have attached the sample file at bottom. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

2 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi aperezd 

     

    Do you want something like this? 

     

    First group by operation id column and add two new columns as below. The Latest Date column will return the latest date for every operation id. 

     

    Then expand the All Rows column and select only necessay columns to expand. 

     

    Add a step to filter rows where [Date] = [Latest Date].

     

    Remove Latest Date column if it's not needed any longer. I have attached the sample file at bottom. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for the solution! 

    I actually have a follow-up question on this. 

    What if I want to keep the initial table and create a new one that would group the data in order to have

     

    col1 operation ID, col2 earliest step date, latest step date

     

    Should I create a new table and use the summarize function to do so? what would it look like?

     

    Thanks loads for the support!