Forum Discussion

Chitemerere's avatar
Chitemerere
Responsive Resident
6 years ago

Extract values from string using DAX

I have the following live Dataset (column "Response") being generated from Microsoft Flow and written to Power BI dataset:

 

Response

Value

Not available

0

1500

1500

2000 Dollars

2000

coût estimatif 260.000 USD

260000

NON

0

N/A

0

Based on FY 2019/2020 Budget 70,652 USD

70652

US$220,000.00

220000

 

I need to extract the numbers only as shown above in the column "Value" using DAX as i cannot use Power Query.  How can this be accomplished.

 

Regards,

Chris

7 Replies

    • Chitemerere's avatar
      Chitemerere
      Responsive Resident

      Thanks Greg for your input, most appreciated.

       

      Regards,

      Chris

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Another way would be to use Text.Select in the query editor.  Add a custom column with a formula like this

     

    = Text.Select([ColumnWithNumbers], {"0".."9"})

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

    • Chitemerere's avatar
      Chitemerere
      Responsive Resident

      Thanks Pat.  This is a live connection to a Power BI Service Dataset so i cannot use Power Query.

       

      Regards,

      Chris

    • Chitemerere's avatar
      Chitemerere
      Responsive Resident

      Thanks Amit.  I thought this will return "TRUE if the value is numeric; otherwise FALSE."

       

      Regards,

      Chris

  • Good afternoon, I'm looking for a feature in Power BI that allows me to extract everything after a specified word from a character string no matter where I find it within the column. Has anyone done this in Power BI?

    Thank you in advance