Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Frixel
Post Prodigy
Post Prodigy

How get data from row above

 

hello,

 

How do I get the data from the line above into the 'article number' column?

 

Frixel_0-1739200857416.png 

 

like this

 

Frixel_1-1739201005863.png

 

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Frixel Try using

In the Power Query Editor, go to the "Add Column" tab.
Click on "Custom Column".
In the "Custom Column" dialog, you can use the following formula to shift the data from the line above into the 'article number' column:
m
= if Text.StartsWith([ColumnName], "Artikelnummer") then null else try #"Previous Row"[ColumnName] otherwise null


Replace ColumnName with the actual name of your column.

Fill Down the Values:

After creating the custom column, you need to fill down the values to propagate the 'article number' to the rows below.
Select the new custom column.
Go to the "Transform" tab.
Click on "Fill" > "Down".




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks for the reply from bhanu_gautam, please allow me to provide another insight.

Hi @Frixel ,

 

Select the 'Artikelnummer' column, in the 'Transform' tab, select 'Fill', then select 'Down'

vdengllimsft_0-1739239264110.png

 

The final result is as follows. Hopefully it will meet your needs.

vdengllimsft_1-1739239447218.png

 

Please see the attached pbix for reference.

 

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @Anonymous 

 

The reason it didn't work for me was because there were empty lines. I filled the empty lines with 'null' and then the Fill down worked

Anonymous
Not applicable

Hi @Frixel ,

 

It looks like your problem has been solved, please mark the helpful reply and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster .
Thank you very much for your kind cooperation!

 

Best Regards,
Dengliang Li

bhanu_gautam
Super User
Super User

@Frixel Try using

In the Power Query Editor, go to the "Add Column" tab.
Click on "Custom Column".
In the "Custom Column" dialog, you can use the following formula to shift the data from the line above into the 'article number' column:
m
= if Text.StartsWith([ColumnName], "Artikelnummer") then null else try #"Previous Row"[ColumnName] otherwise null


Replace ColumnName with the actual name of your column.

Fill Down the Values:

After creating the custom column, you need to fill down the values to propagate the 'article number' to the rows below.
Select the new custom column.
Go to the "Transform" tab.
Click on "Fill" > "Down".




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks @bhanu_gautam 

 

What do you mean with the 'm' before the formule?

I get this error

Frixel_0-1739202587195.png

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.