Forum Discussion
Anonymous
6 years agoNot applicable
Remove Text from Specific Column
Hi , I am new to Power BI. Could any one please guide how to remove "Text " from Alpha numeric coulmns. I want to create another column only with numbers to get average of it.
- 6 years ago
Hi Anonymous ,
To create a custom column as below.
Text.Select([Minutes], {"0".."9"})M code for your reference:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlLwzcwrLUktVoqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Minutes = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Minutes", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Minutes], {"0".."9"})), #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type number}}) in #"Changed Type1"
v-frfei-msft
6 years agoCommunity Support
Hi Anonymous ,
To create a custom column as below.
Text.Select([Minutes], {"0".."9"})
M code for your reference:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlLwzcwrLUktVoqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Minutes = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Minutes", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Select([Minutes], {"0".."9"})),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type number}})
in
#"Changed Type1"