将 excel 个查询转换为 google 个工作表

Transofrm excel query to google sheets

我尝试 convert/transform excel 查询 google sheets.

这是来自 excel 的代码:

let
    Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type any}, {"Column2", type any}, {"Column3", type any}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type any}, {"Column8", type any}, {"Column9", type any}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type any}, {"Column15", type any}}),
    #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
    #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Test1№", Int64.Type}, {"test2", type any}, {"test3", type datetime}, {"test4", type text}, {"test5", type text}, {"test6", type text}, {"test7", type datetime}, {"test8", Int64.Type}, {"test9", type number}, {"test10", type text}, {"test11", type text}, {"test12", type text}, {"test13", type text}, {"Column14", type any}, {"Column15", type any}}),
    #"Sorted Rows" = Table.Sort(#"Changed Type1",{{"test1", Order.Ascending}, {"test3", Order.Descending}}),
    #"Changed Type2" = Table.TransformColumnTypes(#"Sorted Rows",{{"test3", type date}}),
    #"Removed Duplicates" = Table.Distinct(#"Changed Type2", {"test1"})
in
    #"Removed Duplicates"

这link: https://docs.google.com/spreadsheets/d/1fAuw7SkGjs6ZToWYWjB73c90U4lhOHSbyMeFwA7wMPk/edit?usp=sharing

我需要: Col Date 需要排序 last date 在 Test1 中删除重复项 复制 sheet 2

中的数据

提前致谢。

我找到了以下公式的解决方案:

=SORTN(SORT(Sheet1!A2:T;3;false;1;true);10000;2;1;true)