Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 views
in Technique[技术] by (71.8m points)

tableau api - How to present the two bottom levels of a organization chart and present the others levels in just one column?

I have an organization chart divided in two columns, one has the names of the workers and their ukey and the other has the relationship (ukey2, children) between them (So if Jo?o is Luisa boss the ukey2 would be equals to the ukey of Jo?o and the children would be the ukey of Luisa).

What I want to do is to separate the different levels in the chart in order to create a table where I present the last 2 levels separated and the other one's in just one column.

Table with the worker's name and the corresponding ukey

| Ukey | Name |
| -----| -------------- |
| 100 | Antonio            |
| 101  | Joao            |
| 102  | Luisa
|103 | Avelino
|104 | Maria 
|105 | Marília
|106| Tiago 
|107| Fábio
|108| Joaquim
|109| Joaquina
|110| António 
|111| Ana
|112| Anabela
|113| claudia
|114| Rodrigo
|115| Ricardo
|116| Joana 
|117| Mario

Relationship between worker's

| Ukey | Children |
| -----| -------------- |
|100|101|
|101|102|
|102|103|
|102|104|
|102|105|
|102|106|
|103|107|
|103|108|
|104|109|
|104|110|
|104|111|
|105|112|
|105|113|
|112|114|
|112|115|
|112|116|
|113|117|

Expected Result

| Bottom level | Next one | Others|
| -----| -------------- |---------|
|Tiago|Luisa|Joao, Antonio|
|Fábio|Avelino|Luisa, Joao, Antonio|
|Joaquim|Avelino|Luisa, Joao, Antonio|
|Joaquina|Maria|Luisa, Joao, Antonio|
|António|Maria|Luisa, Joao, Antonio|
|Ana|Maria|Luisa, Joao, Antonio|
|Rodrigo|Anabela|Marília, Luísa, Joao, Antonio|
|Ricardo|Anabela|Marília, Luísa, Joao, Antonio|
|Joana|Anabela|Marília, Luísa, Joao, Antonio|
|Mario|Claudia|Marília, Luísa, Joao, Antonio|

Any Idea?

Thanks,

Tiago Fernandes

question from:https://stackoverflow.com/questions/66062397/how-to-present-the-two-bottom-levels-of-a-organization-chart-and-present-the-oth

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...