Forum Discussion

dylantaylor's avatar
dylantaylor
New Member
6 years ago
Solved

Auto Fill Blank Cells with Names

Hello,   Is it possible to use the fill feature in Power Query Editor to fill blank cells with names? In this example, I am trying to fill "Wentworth Property Co" to only the blank cell below, stop...
  • az38's avatar
    6 years ago

    Hi dylantaylor 

    in your case try this workaround:

    1. Trim column

    2. Replace value "" to null

    3. Fill Down column

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("HYvLCsJADEV/JWRdBF9fUHTXIm5cDLOIGm2hk5Q0Rfx74+zOPYebEvZrubNhgz0Vxtwk3MZoR/+CvuBszE8t1e/C32hxho6E3lxYvIb9P8T4qPkAF9OZLe6tbmo+RIZKx6DT4sbTRNDpKk6jwJXkMWDOPw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"(blank)", type text}, {"(blank).1", type text}}),
        #"Promoted Headers" = Table.PromoteHeaders(#"Changed Type", [PromoteAllScalars=true]),
        #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Number", Int64.Type}, {"Name", type text}}),
        #"Trimmed Text" = Table.TransformColumns(#"Changed Type1",{{"Name", Text.Trim, type text}}),
        #"Replaced Value" = Table.ReplaceValue(#"Trimmed Text","",null,Replacer.ReplaceValue,{"Name"}),
        #"Filled Down" = Table.FillDown(#"Replaced Value",{"Name"})
    in
        #"Filled Down"