Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have a requirement where I need to build a drill down object for a chart.
However, I need to use a column that has values as shown below. The values separated by '~' will fall into different levels of hierarchy.
The values in the column would have more than 3 level. But I would have to retract only first three levels of values and put each in a different field.
For Example:
Tree Column:
Earth~Country~State~City
Level1 Value~Level2 Value~Level3 Value~Level4 Value
Expected Result:
Field 1:
Earth
Level 1 Value
Fie ld 2:
Country
Level 1 Value
Field 3:
State
Level3 Value
Thanks in advance for the help.
Regards,
Shyam.
Looking for this?
Script:
Table:
LOAD * Inline [
Earth~Country~State~City
Level1 Value~Level2 Value~Level3 Value~Level4 Value
];
OutputTable:
LOAD SubField([Earth~Country~State~City], '~', 1) as Earth,
SubField([Earth~Country~State~City], '~', 2) as Country,
SubField([Earth~Country~State~City], '~', 3) as City
Resident Table;
DROP Table Table;
Looking for this?
Script:
Table:
LOAD * Inline [
Earth~Country~State~City
Level1 Value~Level2 Value~Level3 Value~Level4 Value
];
OutputTable:
LOAD SubField([Earth~Country~State~City], '~', 1) as Earth,
SubField([Earth~Country~State~City], '~', 2) as Country,
SubField([Earth~Country~State~City], '~', 3) as City
Resident Table;
DROP Table Table;
Thanks Sunindia.
This is what exactly I was looking for. Thanks heaps.
No problem
I am glad I was able to help.
Best,
Sunny
shyamcharan I recommend closing this thread, if you have got the answer you were looking for, by marking correct answer.
Best,
Sunny