The easy way is to just duplicate the query and make one query Debit, and the other Credit and then merge them.Thanks. jdellasala!
I may not be clear about my original question as I'm still new to the power query.
In the same query, I transformed a data set in a step #"Create_DEBIT" (In this table, it has Debit and Date) and subsequently I created another step #"Create_CREDIT" (in this table, it has Credit and Date)
I'd like to merge the two into one table. and I wonder how I can do it within the query.
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Debit = Table.SelectColumns(Source,{"Column1", "Column2"}),
Credit = Table.SelectColumns(Source,{"Column3", "Column4"}),
MergedSelf = Table.NestedJoin(Credit, {"Column3"}, Credit, {"Column3"}, "Credit", JoinKind.LeftOuter)
in
MergedSelf
MergedCrditDebit = Table.NestedJoin(Credit, {"Column3"}, Debit, {"Column1"}, "Credit", JoinKind.LeftOuter)