cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Fill blanks in column based on a condition using IF and Earlier value from another column

Hello everyone,

I am trying to  fill in a column with data from another column and then any blanks should be filled in with previous values from the other column too.

My objective is to create a new "Phase" column using a combination of: "Outline level" = 3 and a partial extract of the text in "Task Name"  (noting not all level "3" will be phases). See table 1.

I am doing this in a two step process:

Firstly I have successfully extracted all the phases from "Task Name" into a new "Phase-1" Column using:

 2019-11-05_15-37-08.png

 

Secondly, and where I am struggling, is I need to replace the blanks from "Phase-1" with the prior phase in the "Phase" column.

I thought I could get it done with the Earlier function but I can't get it to work as it is not identifying the column and shows the below error message.

 2019-11-05_15-36-28.png

 

 I might have tackled this from the wrong angle but any help would be very welcome. Thanks!

 

Table1.

2019-11-05_15-38-09.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Kreator19,

This might be easier if you do it in Query Editor. Create a conditional column and use Fill Up transformation. Also I think you misunderstood the use of EARLIER, usually it uses to access to outer row context

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Kreator19,

This might be easier if you do it in Query Editor. Create a conditional column and use Fill Up transformation. Also I think you misunderstood the use of EARLIER, usually it uses to access to outer row context

View solution in original post

Thanks NickNg278

 

That was very helpful. I've solved this using conditional columns and Transform-Filldown.

Many thanks.

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors