Forum Discussion

BenGWeeks's avatar
BenGWeeks
Regular Visitor
5 years ago
Solved

Extracting value from JSON column into a new column

Hi all,

 

I have some data coming back as follows:

 

 

I transform a number of the columns (e.g. SKU) to JSON, which gives me a record, then I can expand it. But the final stage gives me a list, and I do not have the option (with JSON) to extract the values from the list (e.g. first row). For SKU the JSON is as follows:

 

 

I was hoping I could create a new column, and Power M Query to reference the "Log Volume" property (v.f(1)) (or even Python).


NB I have seen other solutions that have left me perplexed with indexing and pivoting and what not (ref: Solved: Multi-Dimensional Json file to Table - Microsoft Power BI Community).

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi BenGWeeks 

    Is this the result you want ? If yes , you can refer to my method .

    In Power Query , Add Column=>Extract=>Text Between Delimiters. Enter a piece of information before and after the content you need, you can locate the content you need, and create a new column to return the result .

    Notice : all of your value in SKU column have the same format .

    Best Regards

    Community Support Team _ Ailsa Tao

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BenGWeeks 

    Is this the result you want ? If yes , you can refer to my method .

    In Power Query , Add Column=>Extract=>Text Between Delimiters. Enter a piece of information before and after the content you need, you can locate the content you need, and create a new column to return the result .

    Notice : all of your value in SKU column have the same format .

    Best Regards

    Community Support Team _ Ailsa Tao

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