Forum Discussion
Winstoncore
2 years agoNew Member
moving year table to month based table
hi guys, i have this table with only year for every target and i need to make the target based on monthly target thats say i need to add month coulmn to this table or just 01/01/2010 , 01/02/2010 l...
AlienSx
2 years agoSuper User
hello, Winstoncore
let
Source = your_table,
months = {1 .. 12},
dates = List.Buffer(List.Transform(months, (x) => #date(2010, x, 1))),
add_dates = Table.AddColumn(Source, "Month", each dates),
mod_target = Table.TransformColumns(add_dates, {"Target", each _ / 12}),
fnl = Table.ExpandListColumn(mod_target, "Month")
in
fnl