Forum Discussion
Power query transformations to lookup dates from one table into the other
- 2 years ago
You can do that.
For instance, if you wanted to add your EM - Misc Charge table (with dates) to the Invoice Detail table you could add this step to the Invoice Detail query.
combineTables = Table.Combine( { #"Changed Type", Table.ExpandTableColumn( Table.NestedJoin( #"EM - Misc Charge", {"DBName-Point_Id", "DBName-Id", "Charge"}, #"Changed Type", {"DBName-Point_Id", "DBName-Id", "Charge"}, "Invoice Detail", JoinKind.LeftOuter ), "Invoice Detail", {"Date"}, {"Date"} ) } )Again I note that this only works correctly if you have an unique key to build the join with.
In the dummy set for an example if you look atThere are four rows that are not unique. So they end up joining with 245 rows in the Invoice Detail table that are 'EMSQL_BWS-33524, EMSQL_BWS-159176, Standing_Charge'.
Hope this gets you pointed in the right direction.
Cheers.
In the tool ribbon I selected Diagnose Step.
In the last of generated diagnostic queries the total dutation is noted...
Hi jgeddes ,
Many thanks for your quick response!
I am able to figure out now!
Just grouped by query column and did the sum of exclusive during column😊