PDA

View Full Version : Graphical hiearchy



jbesclapez
05-10-2020, 11:43 PM
Hi Guys, (Special hello to Paul :hi:),

I need to create a company graph from a table parent and son.
I have here a macro that kind of does the job except when a company A can be owned at 60% per company A and 40% company C.

Please look at the excel macro file. You will see that it does not work as the company A will only show once.

Please can you help solve this error.

Thanks26627

Bob Phillips
05-11-2020, 05:23 AM
What exactly is not working, it looks right to me with the data provided. Explain with reference to the actual parent/child ids in BD.

paulked
05-11-2020, 03:25 PM
I had trouble following your code but, although it works for 1 'Boss' very well, the way it's coded I couldn't see an easy way to add another.

When you try to add cc as a child of hh then, in hierarchy logic, all hh must be equal to aa as cc is a child of aa.

I gave up in the end and tried to draw a 'SmartArt' chart. That wouldn't have it either!!

26633

jbesclapez
05-11-2020, 11:13 PM
I uploaded a new file with print screen with expectations. Please have a look at it. Thanks

jbesclapez
05-11-2020, 11:14 PM
Thanks PAUL. Your graph is correct, but the macro does not do it like this.
I uploaded an answer above with a new file with expectations.
It's tricky right ? :bug:

paulked
05-12-2020, 03:41 AM
Sorry, still nothing as the names have to be unique or it gets confused. If you use cc1 & cc2 (or A & B etc) it works :thumb

paulked
05-12-2020, 03:55 AM
The only way I see that possible is to start on a blank canvas, and I'm sorry, but even in lockdown I don't have the time to do that :(

jbesclapez
05-12-2020, 05:17 AM
The only way I see that possible is to start on a blank canvas, and I'm sorry, but even in lockdown I don't have the time to do that :(
No worries Paul. Thanks for looking at it! Appreciated.
Have a nice lock down :banghead: :-) :-)