Forum Discussion
Applicable88
Impactful Individual
4 years agoReplace every row with the first row value
Hello, I'm loading multiple csv files into PowerQuery. These are unformatted csv files. Somwhere in the first row is a date field. Before I can delete the first few rows to get to my actually ...
- 4 years ago
Hi Applicable88 ,
Create a new custom column, and enter this as the calculation:
previousStepName{0}[Custom]This will fill the column with the first value in the [Custom] column.
Like this:
Pete
- 4 years ago
If you prefer, you could transform the existing column instead of creating a new one. Try a conversion to date returning null for values that don't work and then fill down.
= Table.FillDown( Table.TransformColumns( #"Previous Step Name Goes Here", {{"Custom", each try Date.FromText(_) otherwise null, type date}} ), {"Custom"} )
AlexisOlson
Super User
4 years agoIf you prefer, you could transform the existing column instead of creating a new one. Try a conversion to date returning null for values that don't work and then fill down.
= Table.FillDown(
Table.TransformColumns(
#"Previous Step Name Goes Here",
{{"Custom", each try Date.FromText(_) otherwise null, type date}}
),
{"Custom"}
)