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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Stacey_Tucker
Regular 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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