3 Replies Latest reply on Nov 3, 2016 2:07 AM by Olivier CATHERIN

# Stuck on polygon decision tree!

Hello

I want to build a decision tree that shows some stakeholders how their outlet risk score has been determined.  I've been using Olivier Catherin's and Jeffery Shaffer's awesome work (Decision trees, flow diagrams, sankeys in Tableau... here is a solution !!! and Data + Science ) but seem to have become stuck.

My issue seems to be coming when I go to the polygon version.  Instead of having the nicely weighted lines, the polygon seems to be cumulative for each story in the feature on Curve A.

Any ideas where I'm going wrong?  Attached is my sample data and workbook, there's only 2 levels to my tree (Story is the lowest level then Feature).  I can just use the Simple DT which works but the polygon version looks heaps better!  There's also a Design that briefly gives an overview of what I'm trying to do!

The sample data is just for 2 outlets, the weightings have to change based on the Outlet Type.

Thanks

• ###### 2. Re: Stuck on polygon decision tree!

Hi Diego

All solved now actually!  Not quite sure how though!

• ###### 3. Re: Stuck on polygon decision tree!

I had a quick overview of the calculations. Here are the problems :

- Position N : Use the Index Calculated field in order to be able to specify the table calc configuration

- Position N : Use Size()+1 instead of Window_Max(Index()+1)

- Position Min : Simply Position Max-Size (calculated field not function)

In the Table Calc configuration, you must define correctly the ordering of the partitioning :

- Starting Position : place the start level first and end level second

- Ending Position : simply do it reversed e.g. end level then start level

For the level of of computation in the table calc, use :

- For P0 Max, Size And P1 Max: at the deepest

- For Index 0 and Position 0 : at level 0

- For index 1 and Position 1 : at level 1

I hope this helps you well

Olivier