I have a requirement where I have to loop through each character in a text field
For example:
| Input | Expected Output |
|---|---|
| a#123456; 12341 | 123456;12341 |
| a123456 12341bd | 123456;12341 |
| a2017d 12341ds | 12341 |
| a123456/12341bd | 123456;12341 |
| n/a | null |
Basically I am cleaning my data here:
- I will remove any charachter that is not a number.
- A number is only valid if there are a minimum of 5 consecutive numbers.
- In the Input to differentiate the ID's a space or ";" or ',' or '/' could have been used. Multiple ID's will be present in some cases and not restricted to two.
- To keep it the same, I will replace all these connectors by ";"
Note:- My steps may not be right, but my expected output is what I am looking to get from the data.
How can we do this using DAX or Query Editor in Power BI?