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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Kreator19
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

3 REPLIES 3
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

And what if the column we are using for comparison is a custom column that we created. In that scenario the column will not be visible in the column name tab.

How to deal with that situaiton.?

Thanks NickNg278

 

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

Many thanks.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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