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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
woshi_eads
Helper I
Helper I

only fill down on row in power query

Hi All,

 

my data is like 

Column1Column2Coumn3col4col4col5col6
bcabas1
 cancd2
     f 
       

 

 

the output should be like this

Column1Column2Coumn3col4col4col5col6
bcabas1
bcancd2
 cancf2
     f 

 

Please note I have a lot columns in my scenario, using if is not possible here like another postSolved: Fill up only one row - Microsoft Power BI Community

 

Tks in advance and happy lunar new year 🙂

 

4 REPLIES 4
Ahmedx
Super User
Super User

Sample PBIX file attached
https://dropmefiles.com/JMSJC

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlLSUUoG4kQgToLSxUBsqBSrE62kgCSbB2WnALERXBYdpwGxUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Coumn3 = _t, col4 = _t, col4.1 = _t, col5 = _t, col6 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Coumn3", type text}, {"col4", type text}, {"col4.1", type text}, {"col5", type text}, {"col6", Int64.Type}}),
    #"Demoted Headers" = Table.DemoteHeaders(#"Changed Type"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type any}}),
    Trans = Table.Transpose(#"Changed Type1"),
    #"Changed Type2" = Table.TransformColumnTypes(Trans,{{"Column3", type text}}),
    #"Replaced 1" = Table.ReplaceValue(#"Changed Type2"," ",(x)=> x[Column2],Replacer.ReplaceText,{"Column3"}),
    #"Replaced 2" = Table.ReplaceValue(#"Replaced 1"," ",null,Replacer.ReplaceValue,{"Column4"}),
    #"Added Custom" = Table.AddColumn(#"Replaced 2", "Custom", each [Column4]),
    #"Replaced Value" = Table.ReplaceValue(#"Added Custom",null,(x)=> x[Column3],Replacer.ReplaceValue,{"Column4"}),
    #"Transposed Table" = Table.Transpose(#"Replaced Value"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type3" = Table.TransformColumnTypes(#"Promoted Headers",{{"Column1", type text}, {"Column2", type text}, {"Coumn3", type text}, {"col4", type text}, {"col4.1", type text}, {"col5", type text}, {"col6", Int64.Type}})
in
    #"Changed Type3"

 

fixed the code a bit
https://dropmefiles.com/kTKac

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlLSUUoG4kQgToLSxUBsqBSrE62kgCSbB2WnALERXBYdpwGxUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Coumn3 = _t, col4 = _t, col4.1 = _t, col5 = _t, col6 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Coumn3", type text}, {"col4", type text}, {"col4.1", type text}, {"col5", type text}, {"col6", Int64.Type}}),
    #"Demoted Headers" = Table.DemoteHeaders(#"Changed Type"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}, {"Column5", type text}, {"Column6", type text}, {"Column7", type any}}),
    Trans = Table.Transpose(#"Changed Type1"),
    #"Changed Type2" = Table.TransformColumnTypes(Trans,{{"Column3", type text}}),
    #"Replaced 1" = Table.ReplaceValue(#"Changed Type2"," ",(x)=> x[Column2],Replacer.ReplaceText,{"Column3"}),
    #"Replaced 2" = Table.ReplaceValue(#"Replaced 1"," ",null,Replacer.ReplaceValue,{"Column4"}),
    #"Added Custom" = Table.AddColumn(#"Replaced 2", "Custom", each [Column4]),
    #"Replaced Value" = Table.ReplaceValue(#"Added Custom",null,(x)=> x[Column3],Replacer.ReplaceValue,{"Column4"}),
    #"Transposed Table" = Table.Transpose(#"Replaced Value"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type3" = Table.TransformColumnTypes(#"Promoted Headers",{{"Column1", type text}, {"Column2", type text}, {"Coumn3", type text}, {"col4", type text}, {"col4.1", type text}, {"col5", type text}, {"col6", Int64.Type}})
in
    #"Changed Type3"
Thennarasu_R
Responsive Resident
Responsive Resident

Hi @woshi_eads 
you have options in querry editor choose fill down option . It will automatically updated the value.

Your should have the Numeric format. Then You can use. if have Text It won't Work.

Refference Pic:

Thennarasu_R_0-1675320866533.png

Thanks,
Thennarasu

 

NikhilChenna
Skilled Sharer
Skilled Sharer

Hi  @woshi_eads

 

I think you can find your solution in this below links,

https://www.youtube.com/watch?v=90EYX7pzVlE

https://www.youtube.com/watch?v=Hc3d8rMSXcQ

 

Regards, 
Nikhil Chenna 


Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors