Forum Discussion
ramankr48
1 year agoHelper II
How can I split a variable-depth, slash-delimited path_column field into separate col in KQL?
Q : How can I split a variable-depth, slash-delimited path_column field into separate path_lvl_1, path_lvl_2, … columns in Kusto (Fabric) so that Power BI (in DirectQuery mode) can consume a fixed sc...
- 1 year ago
Sure thing - just remove the column defintion fret the pivot function. Then the previous query will be dynamic
datacoffee
1 year agoMost Valuable Professional
Sure thing - just remove the column defintion fret the pivot function. Then the previous query will be dynamic
ramankr48
1 year agoHelper II
T
| extend ColSplit = split(values, "/")
| mv-expand ColIndex = range(0, array_length(ColSplit), 1)
| extend columnName = strcat("col", tostring(ColIndex + 1)), columnValue = ColSplit[ColIndex]
| evaluate pivot(columnName, any(columnValue))
| project-away ColSplit, ColIndex