简体   繁体   中英

Remove columns which have a number in that column name that is higher than threshold

There is an example table with the following columns:

  • "Column A [68]"
  • "Column B [90]"
  • "Column C [29]"
  • "Column D [133]"
  • "Column E [56]"

How can all columns that have a number between the brackets that is higher than 80 be removed? (in this case "Column B [90]" and "Column D [133]")

try

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Remove =  Table.RemoveColumns(Source,List.Select(Table.ColumnNames(Source), each Number.From(Text.BetweenDelimiters(_,"[", "]"))>80))
in Remove

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM