Forum Discussion
AnushaK
2 years agoRegular Visitor
Need help with the Power Query
Hi Everyone, I have just started to work on Power BI. I am stuck currently. In the table, if there is a null value for a row, I want to create new rows and copy previous date's data in the rows ...
- 2 years ago
let Source = your_table, group = Table.Group( Source, "DateRange", {{"x", (x) => if x[Date]{0} = null then null else x}, {"Date", (x) => if x[Date]{0} = null then x[DateRange]{0} else x[Date]{0}}} ), down = Table.FillDown(group, {"x"}), xpand = Table.ExpandTableColumn(down, "x", {"Transactions"}) in xpand
AlienSx
2 years agoSuper User
let
Source = your_table,
group = Table.Group(
Source, "DateRange",
{{"x", (x) => if x[Date]{0} = null then null else x},
{"Date", (x) => if x[Date]{0} = null then x[DateRange]{0} else x[Date]{0}}}
),
down = Table.FillDown(group, {"x"}),
xpand = Table.ExpandTableColumn(down, "x", {"Transactions"})
in
xpand