Forum Discussion
Task Completed Daily
Hi snoozee ,
Please open a blank query and paste the code in Power Query Editor.
let
Source = List.Distinct( L_Teller_BalanceTransaction[BalanceDatetime] ),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "BalanceDatetime"}}),
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "BranchCode", each List.Distinct(L_Teller_BalanceTransaction[BranchCode])),
#"Expanded BranchCode" = Table.ExpandListColumn(#"Added Custom", "BranchCode"),
#"Merged Queries" = Table.NestedJoin(#"Expanded BranchCode", {"BalanceDatetime", "BranchCode"}, L_Teller_BalanceTransaction, {"BalanceDatetime", "BranchCode"}, "L_Teller_BalanceTransaction", JoinKind.LeftOuter),
#"Expanded L_Teller_BalanceTransaction" = Table.ExpandTableColumn(#"Merged Queries", "L_Teller_BalanceTransaction", {"BalanceType"}, {"BalanceType"}),
#"Added Custom1" = Table.AddColumn(#"Expanded L_Teller_BalanceTransaction", "Completed", each if [BalanceType] = "BULK" then "Y" else "N"),
#"Sorted Rows" = Table.Sort(#"Added Custom1",{{"BalanceDatetime", Order.Ascending}, {"BranchCode", Order.Ascending}})
in
#"Sorted Rows"
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi
Thanks for this, however it's not working as it's only showing me Yes results for the BULK task when i know that some should be No.
This is what i'm trying to achieve
I need to be able to see whether a branch (BranchCode) has completed a balance (BULK) on a daily basis, so if they have completed it then the completed column would show Yes, if not it would show No.
Hope that makes sense