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
JoanCampbell
Frequent Visitor

How can I combine my data to one row per item

I need my data to be on one row per item, Any ideas on how I can combine

JoanCampbell_0-1646443476169.png

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @JoanCampbell 

It's easy to get by using Fill in Power Query Editor, try this

(1) Replace 0 with null

(2) Fill Up/Down

(3) Remove duplicates

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcvP3d1HwLEnNVVBWMFHSUQIiAyA2UorVwSppBFaATVLFFKoXKB0LAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Currency.Type}, {"Column3", Int64.Type}, {"Column4", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type",0,null,Replacer.ReplaceValue,{"Column3"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",0,null,Replacer.ReplaceValue,{"Column4"}),
    #"Filled Up" = Table.FillUp(#"Replaced Value1",{"Column2", "Column3", "Column4"}),
    #"Filled Down" = Table.FillDown(#"Filled Up",{"Column2", "Column3", "Column4"}),
    #"Removed Duplicates" = Table.Distinct(#"Filled Down")
in
    #"Removed Duplicates"

vxiaotang_0-1646709391325.pngvxiaotang_0-1646709243886.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @JoanCampbell 

It's easy to get by using Fill in Power Query Editor, try this

(1) Replace 0 with null

(2) Fill Up/Down

(3) Remove duplicates

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcvP3d1HwLEnNVVBWMFHSUQIiAyA2UorVwSppBFaATVLFFKoXKB0LAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Currency.Type}, {"Column3", Int64.Type}, {"Column4", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type",0,null,Replacer.ReplaceValue,{"Column3"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",0,null,Replacer.ReplaceValue,{"Column4"}),
    #"Filled Up" = Table.FillUp(#"Replaced Value1",{"Column2", "Column3", "Column4"}),
    #"Filled Down" = Table.FillDown(#"Filled Up",{"Column2", "Column3", "Column4"}),
    #"Removed Duplicates" = Table.Distinct(#"Filled Down")
in
    #"Removed Duplicates"

vxiaotang_0-1646709391325.pngvxiaotang_0-1646709243886.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@JoanCampbell So in Power Query you could do a Group By and maybe a max aggregation for each column. Otherwise if you did a table visualization you could create a measure for each column that did a MAX and it should automatically only show a single row for each distinct Item.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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