Forum Discussion
WinterGarden
Resolver I
1 year agoPower query issue, not sure how to implement this..
Hi All, There is one sharepoint folder. In that folder i've added excel files corresponding to each month. Then i've loaded this folder in to the powerbi desktop and combined these in the edit quer...
- Anonymous1 year ago
Hi WinterGarden ,
You can ttry the following codelet Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("vdAxCoAwDAXQq0jmDkmT/NoLOLuW0vtfQ8VBEFoc1CUk8EjCr5WWEp0Crax7PYbpbJHZjdVBLQyUuYoIy1AZIrNJnF9QnYt2Ket/f1ePdokiZfAvppPBh8qTOACl1jY=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [FiscalYear = _t, Month = _t, #"FiscalYear-Month" = _t, UDN = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"FiscalYear", type text}, {"Month", type text}, {"FiscalYear-Month", type text}, {"UDN", Int64.Type}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"FiscalYear-Month", "UDN"}, {{"GroupTable", each Table.AddIndexColumn(_, "Index", 1, 1, Int64.Type), type table [FiscalYear=nullable text, Month=nullable text, #"FiscalYear-Month"=nullable text, UDN=nullable number, Index=Int64.Type]}}), #"Expanded GroupTable" = Table.ExpandTableColumn(#"Grouped Rows", "GroupTable", {"FiscalYear", "Month", "Index"}, {"FiscalYear", "Month", "Index"}), #"Filtered Rows" = Table.SelectRows(#"Expanded GroupTable", each ([Index] = 1)), #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Index"}) in #"Removed Columns"Final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
1 year agoNot applicable
Hi WinterGarden ,
You can ttry the following code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("vdAxCoAwDAXQq0jmDkmT/NoLOLuW0vtfQ8VBEFoc1CUk8EjCr5WWEp0Crax7PYbpbJHZjdVBLQyUuYoIy1AZIrNJnF9QnYt2Ket/f1ePdokiZfAvppPBh8qTOACl1jY=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [FiscalYear = _t, Month = _t, #"FiscalYear-Month" = _t, UDN = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"FiscalYear", type text}, {"Month", type text}, {"FiscalYear-Month", type text}, {"UDN", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"FiscalYear-Month", "UDN"}, {{"GroupTable", each Table.AddIndexColumn(_, "Index", 1, 1, Int64.Type), type table [FiscalYear=nullable text, Month=nullable text, #"FiscalYear-Month"=nullable text, UDN=nullable number, Index=Int64.Type]}}),
#"Expanded GroupTable" = Table.ExpandTableColumn(#"Grouped Rows", "GroupTable", {"FiscalYear", "Month", "Index"}, {"FiscalYear", "Month", "Index"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded GroupTable", each ([Index] = 1)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Index"})
in
#"Removed Columns"
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
WinterGarden
Resolver I
1 year agoHi Anonymous,
Thank you so much 👍