Forum Discussion
Anonymous
4 years agoNot applicable
Transformation to Add Days
Guys, what is wrong with this syntax please? It doesn't generate error but it doesn't make the needed transformation either. What I need to do is to add 1 day over the dates (by transformation not...
jennratten
4 years agoSuper User
You were very close! Here is the script you need. When transforming columns, the function takes a list of transformations that includes the column name to be transformed followed by the transformation to perform. Since the column name is included as the first element in the transformations list, all subsequent references to the column name should use an underscore _ instead of the actual column name.
Table.TransformColumns(Source,{{"Hiring Effective Date", each Date.AddDays(_,1), type date}})
BEFORE (my date column is named Date)
AFTER
- Vickar3 years agoAdvocate II
thanks a million. I was trying to apply this transformation on 3 columns of a table, and couldn't get it right, as I was again passing the column reference instead of the underscore.