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"} )
Anonymous
3 years agoNot applicable
Hello Pete,
it seems like your answer is the solution to my problem.
But unfortunate it doesn't work in my case.
I need a new column where every row takes the value from first row column month.
Could you pls have a look at it and advice?
BA_Pete
Super User
3 years agoHi Anonymous ,
For your scenario, it should just be:
previousStepName{0}[Month]
Where 'previousStepName' is the name of whatever Power Query step this linecomes after in the process order.
Pete