Forum Discussion
yel4h
1 year agoNew Member
[DAX] Dynamic way to get numeric values [0..9] from string with no pattern.
Hey, I have been wanting to make a DAX expression to solve this for a while. I saw a lot of others also struggle to do this with DAX and would have to use Power Query to solve. The following code...
- 1 year ago
You are totally correct, I had comeback from a meeting and had forgot to change the code to refer to the virtual colum I created with addcolumn.
My intial test which works but can become concumption heavy, esp when strings are lenghty:CONCATENATEX ( FILTER ( GENERATESERIES(1, LEN(txt)), MID(txt, [Value], 1) >= "0" && MID(txt, [Value], 1) <= "9" ), MID(txt, [Value], 1), "" )
Ahmedx
Super User
1 year agoThis has already been written about a long time ago
https://www.antmanbi.com/post/extract-numbers-from-an-alphanumeric-string-using-dax