Forum Discussion
Replace every row with the first row value
- 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"} )
Hi @Syndicate_Admin ,
thanks a lot for this solution, it works perfectly. I stumbled across a similar yet slightly more complex issue and would like to ask for your support.
In my case, I have three observations per entity and in the first row the column is filled with the person name. In the two subsequent it is filled with null, but should actually be filled with the person name as in the first row above. After three rows, one is again filled with the next person name for which again two blank rows come that should be filled with that persons name. So data looks like below.
Is there a way to adapt your solution for this case?
Thanks so much and best wishes
Tobi
| Year | Person |
| 1 | A |
| 2 | null |
| 3 | null |
| 1 | B |
| 2 | null |
| 3 | null |
| 1 | C |
Syndicate_Admin I think right click on the column and make a "Fill Down" will do the trick.
Best.