Forum Discussion
Dynamic Week Appending
- 5 years ago
Hi Anonymous ,
Based on your description, you can use Merge and Append features in power query to achieve it easily.
Merge Jan table and Feb table as a new table, expand the table column, filter rows and remove columns, the whole query is like this:
let Source = Table.NestedJoin(#"Weekly February", {"date"}, #"Weekly January", {"date"}, "Weekly January", JoinKind.LeftOuter), #"Expanded Weekly January" = Table.ExpandTableColumn(Source, "Weekly January", {"date"}, {"Weekly January.date"}), #"Filtered Rows" = Table.SelectRows(#"Expanded Weekly January", each ([Weekly January.date] = null)), #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Weekly January.date"}) in #"Removed Columns"You will get this table:
Then append this table with Jan table as a new table:
You can only load the result table and disable loading other tables to improve performance, close and apply it in power query:
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Based on your description, you can use Merge and Append features in power query to achieve it easily.
Merge Jan table and Feb table as a new table, expand the table column, filter rows and remove columns, the whole query is like this:
let
Source = Table.NestedJoin(#"Weekly February", {"date"}, #"Weekly January", {"date"}, "Weekly January", JoinKind.LeftOuter),
#"Expanded Weekly January" = Table.ExpandTableColumn(Source, "Weekly January", {"date"}, {"Weekly January.date"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded Weekly January", each ([Weekly January.date] = null)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Weekly January.date"})
in
#"Removed Columns"
You will get this table:
Then append this table with Jan table as a new table:
You can only load the result table and disable loading other tables to improve performance, close and apply it in power query:
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.