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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Conditional Fill Down

i Havei Want

Null

Null
NullNull
NullNull
AA
NullA
NullA
NullA
AA
NullNull

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUorVQSYc0fi4BVOUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Data = _t]),
    #"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Data"}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Replaced Value", "Data", "Data1"),
    #"Duplicated Column1" = Table.DuplicateColumn(#"Duplicated Column", "Data", "Data2"),
    #"Filled Down" = Table.FillDown(#"Duplicated Column1",{"Data1"}),
    #"Filled Up" = Table.FillUp(#"Filled Down",{"Data2"}),
    Custom1 = Table.ReplaceValue(#"Filled Up",each [Data],each if [Data1]=[Data2] then [Data1] else [Data],Replacer.ReplaceValue,{"Data"}),
    #"Removed Columns" = Table.RemoveColumns(Custom1,{"Data1", "Data2"})
in
    #"Removed Columns"

 

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUorVQSYc0fi4BVOUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Data = _t]),
    #"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Data"}),
    #"Duplicated Column" = Table.DuplicateColumn(#"Replaced Value", "Data", "Data1"),
    #"Duplicated Column1" = Table.DuplicateColumn(#"Duplicated Column", "Data", "Data2"),
    #"Filled Down" = Table.FillDown(#"Duplicated Column1",{"Data1"}),
    #"Filled Up" = Table.FillUp(#"Filled Down",{"Data2"}),
    Custom1 = Table.ReplaceValue(#"Filled Up",each [Data],each if [Data1]=[Data2] then [Data1] else [Data],Replacer.ReplaceValue,{"Data"}),
    #"Removed Columns" = Table.RemoveColumns(Custom1,{"Data1", "Data2"})
in
    #"Removed Columns"

 

Anonymous
Not applicable

You Are Rockstar Bro Done

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.