Forum Discussion
Stealth02
3 years agoHelper I
Power Query - Not all "Tables" created equal?
Context: I have gaps in my master data - where I have cost centers in my fact table that are not present in my master data for particular fiscal year - but those cost centers are present in other yea...
- 3 years ago
You don't need to do any appending. You can merge and fill up instead.
let x=Count, Source = Table.FromRows(List.Zip({{1..x},List.Repeat({"2018-19"},x)})&List.Zip({{1..x},List.Repeat({"2019-20"},x)})&List.Zip({{1..x},List.Repeat({"2020-21"},x)}),{"CC","FY"}), #"Merged Queries" = Table.NestedJoin(Source, {"CC", "FY"}, Dim_ForSort, {"CC", "FY"}, "Dim_ForSort", JoinKind.LeftOuter), #"Expanded Dim_ForSort" = Table.ExpandTableColumn(#"Merged Queries", "Dim_ForSort", {"Dimension Details"}, {"Dimension Details"}), #"Sorted Rows" = Table.Buffer(Table.Sort(#"Expanded Dim_ForSort",{{"CC", Order.Ascending}, {"FY", Order.Ascending}})), #"Filled Up" = Table.FillUp(#"Sorted Rows",{"Dimension Details"}) in #"Filled Up"
AlexisOlson
3 years agoSuper User
I want it in memory in the sorted order, so I buffer after the sort.
Stealth02
3 years agoHelper I
Super thank you.
I will accept your original explanation as the solution - as it is likely the most probable answer. Thanks for all the feedback.