Forum Discussion
Function to update any table with new values from another table
Hi Thomas,
Sorry, was not clear in my post - thee attributes list assumes "group by" columns, in your case [Date]. 1-5 are "value" columns.
If you do it this way it should work Ok, in my test 1-5 has "number-type" values, everything works fine. In fact, it doe not matter what type of data is in these columns, it will be removed in any case (a code for adding the formatting back is quite simple anyway). You can even mix formats in the "old" and "new" data, in this case a number can be replaced by a text and vice versa.
This is my code for using the function (assuming it is called fUpdate😞
let
Source = fUpdateTable(DictionaryTbl, UpdateTbl, {"Date"})
in
Source
Kind regards,
John
Anonymous
Important to note: it ONLY works with this trigger code.
I used the interface and Power Query will make me chose a column from one of the Tables.
As a reasult the list of dates is handed over as Attributes parameter instead of the column name ("Date").
With that in mind: works great!
- thowa6 years agoRegular Visitor
Have posted a summary of the two solutions proposed in form of functions here:
Overlaying/merging two tables to add missing data in empty cells and new rows/columns