Forum Discussion
Alexjaco2
2 years agoNew Member
Removing 3 digit numbers from a list
Hi All,
I have a list of numbers (stored as texts) that are semi colon sepearated and I need specific 3 digit values removed. Is there any Power Query that can do this? Here is what I have and what I need.
| Have | Want |
| 90832 | 90832 |
| 99213 | 99213 |
| 99213 | 99213 |
| 99213 | 99213 |
| 99214 | 99214 |
| 99214 | 99214 |
| 636 90750 ; 771 90471 | 90750 ; 90471 |
| 99213 | 99213 |
| 99214 | 99214 |
| 914 90791 | 90791 |
| 99214 | 99214 |
| 636 90674 ; 771 90471 | 90674 ; 90471 |
| 99214 | 99214 |
| 99214 | 99214 |
| 301 80050 ; 301 80061 ; 301 82607 ; 780 Q3014 | 80050 ; 80061 ; 82607 ; Q3014 |
Alexjaco2 Maybe this?
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fc2xDYAwDATAVazUFO/Y2ImYgjrK/mvgIGiiQHey/P+tpYoiOfUtVDPLr3SSiVGF76CD3Dmszt851vFdedlirsuWeVPAVIB787Hx62zw0VJAZxwi0S8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Have = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Have", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select(Text.Split([Have], " "), each Text.Length(_) <> 3))) in #"Added Custom"
2 Replies
- Greg_Deckler
Community Champion
Alexjaco2 Maybe this?
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fc2xDYAwDATAVazUFO/Y2ImYgjrK/mvgIGiiQHey/P+tpYoiOfUtVDPLr3SSiVGF76CD3Dmszt851vFdedlirsuWeVPAVIB787Hx62zw0VJAZxwi0S8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Have = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Have", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Combine(List.Select(Text.Split([Have], " "), each Text.Length(_) <> 3))) in #"Added Custom" - Alexjaco2New Member
That works! Thanks!