Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Split column with multiple headers and rows in it

YoannaRaykova
5 - Atom

Hi,

I have the following file which you can find attached.
Please know that due to security reasons this is a sample file and the data is slightly changed.
The original file contains more than 40 000 rows.
The file will be changed with new data regularly so the attached rows are an example ones.
This is a Power BI dataset.

The task is to split the Audit column into different columns.
Firstly, you can find the header and then the values.

For example:

"Id":"fff46-df4d-8hd-wer5-8dh8"
"CapacityName":"VGHO JKOP 5H"

They are split by commas but if there is a missing header and value there is no indication for it - there is no empty space between 2 commas or something like that.

And this is the issue exactly - for the null values there are no records at all, therefore, the number of headers and their values for each Audit row is different and there is no empty value/cell for the missing ones.

I am not sure how to split them properly and create a sustainable solution for this case.

I will be glad if somebody can assist me further.

Thank you in advance!

2 REPLIES 2
TheOC
15 - Aurora
15 - Aurora

hi @YoannaRaykova 

I believe what you need is the json parse tool. This seems to work perfectly:

TheOC_0-1646389555503.png



I've produced two example outputs, one with them split into rows, and then one crosstabbed to make it as clean as possible.

 

Hope this helps, please find attached.
TheOC


Bulien
YoannaRaykova
5 - Atom

Hi @TheOC,

Thank you for the quick and elegant solution.
It works perfectly.

Thank you a lot!

Warm regards,
Yoanna

Labels
Top Solution Authors