Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
This is my first time posting here (thanks in advance for your help). I would like to do two things:
1.) Create a new column to populate all dates (month-year), starting with the earliest date (Jan 2022) and going through largest date (August 2022). So it would have Jan, Feb, March...Aug 2022. I believe this is achieved with List.Generate but let me know if there is a better way.
2.) After creating this list, I need to create a "New Value" column which either (i) pulls the existing Value if the date existed in the original data, or alternatively (ii) if the data did not exist, then simply pull copy down the latest value that did exist. So in the below example, it would have 4.3 for Jan + Feb 2022, 4.5 for March - July 2022, and 4.7 for August 2022.
Value | Date |
4.3 | 1/1/2022 |
4.5 | 3/1/2022 |
4.7 | 8/1/2022 |
Is this easy to build?
Solved! Go to Solution.
let
Source = Your_Source,
List_Month = Table.FromColumns(
{List.Select(
List.Transform(
{Number.From(List.Min(Source[Date]))..Number.From(List.Max(Source[Date]))},
Date.From),
each Date.Day(_)=1)},
type table [Date = date]),
Join = Table.NestedJoin(List_Month, {"Date"}, Source, {"Date"}, "Source", JoinKind.LeftOuter),
Expand = Table.ExpandTableColumn(Join, "Source", {"Value"}, {"Value"}),
FillDown = Table.FillDown(Expand,{"Value"})
in
FillDown
Stéphane
let
Source = Your_Source,
List_Month = Table.FromColumns(
{List.Select(
List.Transform(
{Number.From(List.Min(Source[Date]))..Number.From(List.Max(Source[Date]))},
Date.From),
each Date.Day(_)=1)},
type table [Date = date]),
Join = Table.NestedJoin(List_Month, {"Date"}, Source, {"Date"}, "Source", JoinKind.LeftOuter),
Expand = Table.ExpandTableColumn(Join, "Source", {"Value"}, {"Value"}),
FillDown = Table.FillDown(Expand,{"Value"})
in
FillDown
Stéphane