Forum Discussion

Pick's avatar
Pick
Helper II
6 years ago
Solved

create table with multiple rows with single dates to new table start and end dates

Hi,   I have a table below also with a time column.  I want to create a new table whch shows for every ID the two new columns showing the first Start data/time for that ID and one for the End date/...
  • v-lili6-msft's avatar
    6 years ago

    hi Pick 

    Just create a calculated table by this formula:

     

    New Table = 
    SUMMARIZE (
        'Table',
        'Table'[ID],
        'Table'[Order_No],
        'Table'[Phase],
        'Table'[CONTROL_STRATEGY],
        "Start date", CALCULATE (
            MIN ( 'Table'[Updated_At] ),
            FILTER ( ALL('Table'), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
        ),
        "End date", CALCULATE (
            MAX ( 'Table'[Updated_At] ),
            FILTER ( ALL('Table'), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
        )
    )

     

     

    Regards,

    Lin