I have a string column which includes "," delimiter, I want to split this column into multiple rows.
Here's the table
|Token |Shop|
|a |P |
|A10,A9a,C1a,F1 |R |
Expected Output:
|Token |Shop|
|a |P |
|A10 |R |
|A9a |R |
|C1a |R |
|F1 |R |
I tried below logic using mv-expand but it doesn't seem to work
datatable(Tokens:string, Shop:string)["a", "P",
"A10,A9a,C1a,F1", "R" ]
| mv-expand Token =todynamic(Tokens) to typeof(string)
You can use split() before mv-expand:
datatable(Tokens:string, Shop:string)["a","P","A10,A9a,C1a,F1","R" ]
| mv-expand token = split(Tokens, ",") to typeof(string)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With