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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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