Forum Discussion

danishwahab's avatar
danishwahab
Helper I
1 year ago
Solved

Xlookup from string

Dear All,   We are getting data in the below format where we are getting Raw value against each point and we need to identify it's state based on the metata in the State column coming in as a strin...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Thank you uzuntasgokberk 

    Hi, danishwahab 

    You can do this in Power Query in Power BI. Here are the detailed steps:

    First I have the following dataset:

    To open the Advanced Editor:

    Copy the following M code into the Advanced Editor:

    ExtractText = Table.AddColumn(#"Changed Type", "Extracted Text", each Text.BetweenDelimiters(_[State],Text.From( _[Raw Data Value]) & "=",";"))

    The results are as follows:

    I have uploaded the PBIX file I used for this post below.

     

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.