Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Power Query - Add Column which is global minimum of another column

Hi,

 

I have the the following data :

response_timestampidstatusinfos
26/10/2023 4:30 PM1active...
26/10/2023 4:31 PM2inactive...
26/10/2023 4:33 PM3active...

 

I would like to keep the minimum response_timestamp but can't figure out the M code to do so. I have calculated the minimum with List.min() function but don't know how to assign it to a new column...

 

The expected result would be : 

 

response_timestampmin_response_timestampidstatusinfos
26/10/2023 4:30 PM26/10/2023 4:30 PM1active...
26/10/2023 4:31 PM26/10/2023 4:30 PM2inactive...
26/10/2023 4:33 PM26/10/2023 4:30 PM3active...
  • Hi Anonymous 

    = Table.AddColumn(#"PreviousStepName", "Min_response_timestamp", each List.Min(Table[response_timestamp]))

1 Reply

  • mlsx4's avatar
    mlsx4
    Memorable Member

    Hi Anonymous 

    = Table.AddColumn(#"PreviousStepName", "Min_response_timestamp", each List.Min(Table[response_timestamp]))