|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 ThxAlot 于 2022-4-15 21:57 编辑
最基本的EXCEL公式就能搞定
- let
- Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyNjE1M1fSUYoE41gdYsTQhOCqICIWyKoQQnBVEBFLZFUQEQNkVehCsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ITEM = _t, A = _t, B = _t]),
- Grp = Table.Group(Source, "ITEM", {"grp", each [A=if List.Contains([A],"Y") then "Y" else "", B=if List.Contains([B],"Y") then "Y" else ""]}, 1),
- #"Expanded grp" = Table.ExpandRecordColumn(Grp, "grp", {"A", "B"})
- in
- #"Expanded grp"
复制代码
|
|