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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SNik
Helper I
Helper I

Get previous not NULL record

Hi

I have some Hierarchy data like

 

Product      Model

  A                NULL

  NULL          A1 Name

  NULL          A1 Description

 B                  NULL

NULL            B1 name

NULL            B1 Description

NULL            B2 name

NULL            B2 Description

Questions:

1- what should be my approach? i know that Hierarchy is not supported yet

2- I like to "Add a Column" that will give me the previous record that is not null something like 

 

Product      Model                            NewColum

  A                NULL                               A

  NULL          A1 Name                        A

  NULL          A1 Description               A

 B                  NULL                             B

NULL            B1 name                        B

NULL            B1 Description               B

NULL            B2 name                       B

NULL            B2 Description               B

 

how can i do that?

thanks

Sincerely
Nik- Shahriar Nikkhah
1 ACCEPTED SOLUTION
konstantinos
Memorable Member
Memorable Member

@SNik When you load the data in select the column "Product"  go to "Transform" and then Select from the menu "Fill Down".

Then you have your new column.

 

1.png

 

 

Depending your data model and how you would like to display the data you can a) filter out the null values in Model or b) you can add the Product in the model column.

For the first select the column drop down menu and unselect null

For the second "Add custom column" and the formula will be 

if [Model] = null then [Product] else [Model]

 

3.png

 

 

2.pngHope it helps

Konstantinos Ioannou

View solution in original post

2 REPLIES 2
konstantinos
Memorable Member
Memorable Member

@SNik When you load the data in select the column "Product"  go to "Transform" and then Select from the menu "Fill Down".

Then you have your new column.

 

1.png

 

 

Depending your data model and how you would like to display the data you can a) filter out the null values in Model or b) you can add the Product in the model column.

For the first select the column drop down menu and unselect null

For the second "Add custom column" and the formula will be 

if [Model] = null then [Product] else [Model]

 

3.png

 

 

2.pngHope it helps

Konstantinos Ioannou

I love your simple and perfect solution, i know that PowerBI is not and ETL/CleanUp tool but it does alot

Anyways thank you very much

Sincerely

Nik

Sincerely
Nik- Shahriar Nikkhah

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.