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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Stacey_Tucker
Frequent Visitor

Insert a custom row

Hi, i have the below syntax, and want to add a row to the bottom that contains 

" size = export, Index = 21"

My table is a 2X 21 currently.

 

Thanks 

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMs3NVYrViVYyh9KGBnCGtgKMaQpnaENZRgZwBlzIFM6ACRkbwBlwIVM4AyZkYgBnwISci/LL88Asp8zikqJ8MDMgJ7EkFcwKLknMS0ksSgFzfBKL0oHCsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Sizes"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 0, 1, Int64.Type),
#"Replaced Value" = Table.ReplaceValue(#"Added Index","10+ mm","10mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","15+mm","15mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","25+mm","25mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","30+mm","30mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value4" = Table.ReplaceValue(#"Replaced Value3","35+mm","35mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value5" = Table.ReplaceValue(#"Replaced Value4","40+mm","40mm+",Replacer.ReplaceText,{"Sizes"}),
#"Replaced Value6" = Table.ReplaceValue(#"Replaced Value5","20+mm","20mm+",Replacer.ReplaceText,{"Sizes"})

in

#"Replaced Value6"

1 REPLY 1
wdx223_Daniel
Super User
Super User

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMs3NVYrViVYyh9KGBnCGtgKMaQpnaENZRgZwBlzIFM6ACRkbwBlwIVM4AyZkYgBnwISci/LL88Asp8zikqJ8MDMgJ7EkFcwKLknMS0ksSgFzfBKL0oHCsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Sizes"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 0, 1, Int64.Type),
Custom1 = Table.TransformColumns(#"Added Index",{"Sizes",each let a=Text.Split(_,"+") in a{0}&Text.Trim(a{1}?)&"+"??_}),
Custom2 = Custom1 &#table(Table.ColumnNames(Custom1),{{"export",Table.RowCount(Custom1)}})
in
Custom2

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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