This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi All -
Getting stuck trying to build hierarchy levels for account data. Here is an example of what I want the outcome to me. The level is what I am after. The root (level 1) always has a null for parentid in the dataset. Was attempting an iterative macro but I am struggling.
Id | ParentId | level |
1 | 1 | |
2 | 1 | 2 |
3 | 1 | 2 |
4 | 1 | 2 |
5 | 1 | 2 |
6 | 2 | 3 |
7 | 2 | 3 |
8 | 3 | 4 |
9 | 3 | 4 |
10 | 3 | 4 |
11 | 4 | 5 |
12 | 4 | 5 |
13 | 4 | 5 |
14 | 4 | 5 |
15 | 4 | 5 |
You'll have to supply a sample of what your input data looks like. Without that, we don't know where to start. It's like trying to force-lift a X-wing, without first learning how to do a hand stand:)
Your current workflow and macro would help too. That way we could focus on fixing what's wrong with your solution instead of inventing a new one for you.
Dan
@danilang Sorry about that! The input data are the 2 left columns. Id and Parent Id. Below is the example. I am attaching an example of how I do this manually. The problem with this is I would need to build out for every new level. I want it to be dynamic.
Id | ParentId |
1 | |
2 | 1 |
3 | 1 |
4 | 1 |
5 | 1 |
6 | 2 |
7 | 2 |
8 | 3 |
9 | 3 |
10 | 3 |
11 | 4 |
12 | 4 |
13 | 4 |
14 | 4 |
15 | 4 |
Try the "Tile" tool under Preparation.
Config as:
Tile Method = Unique Value
Unique Fields = ParentID
Everything else as is.
That should do it. No macro needed.
Hi!
After I ran the first tile statement all of the people in my list have been grouped by their supervisors. Which is great! Do the supervisors need to be grouped again by their supervisors, or is that already complete. Sorry for the silly question; I am just trying to get my head around a recursive process for my data.
Data looks like this:
Unique ID
Fist name
Last name
Supervisor Unique ID
The only time the Unique ID would match the Supervisor ID would be in the case of the CEO.
I think this should help you:
http://insightsthroughdata.com/how-to-import-sfdc-recursive-hierarchies-to-tableau/
This worked so well! Thanks a million... sometime the ultimate sophistication is simplicity!