Forum Discussion
Syndicate_Admin
Administrator
4 years agoHow to get minimum dates from the row in a sharepoint list
How to get minimum dates from the row in a sharepoint list
I have 20 dates in single row, out of that I need to get the minimum (Early) date.
Example:
Hi, Syndicate_Admin ;
You could add a conitional column as follow:
The final show:
M language:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNA1NNQ1MlbSQXBMlWJ1iJQzRZOLBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date1 = _t, Date1.1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date1", type date}, {"Date1.1", type date}}), #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Date1.1", "Date2"}}), #"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Custom", each if [Date1] < [Date2] then [Date1] else if [Date2] <= [Date1] then [Date2] else null) in #"Added Conditional Column"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- KT_Bsmart2gethe
Impactful Individual
HI Syndicate_Admin ,
You can add a custom column and apply the formula below:
List.Min(Record.ToList(_))
Regards
KT
- v-yalanwu-msft
Community Support
Hi, Syndicate_Admin ;
You could add a conitional column as follow:
The final show:
M language:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwtNA1NNQ1MlbSQXBMlWJ1iJQzRZOLBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date1 = _t, Date1.1 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date1", type date}, {"Date1.1", type date}}), #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Date1.1", "Date2"}}), #"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Custom", each if [Date1] < [Date2] then [Date1] else if [Date2] <= [Date1] then [Date2] else null) in #"Added Conditional Column"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.