BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
HugoVini
Obsidian | Level 7

I'd like to create a cross reference table with hierarchies, this is my first time trying it.

First of all, I have no ideia how is the better table structure to work on hierarchy, so you guys could help on it.

 

I've this table below:

 

table ex.JPG

 

And my goal is show the result like that:

 

visao hierarquica.JPG

 

Does anybody know if is possible to reach this result according my table or I need to create another table with new structure?

1 ACCEPTED SOLUTION

Accepted Solutions
Robert_T
Fluorite | Level 6

A hierarchy is an arrangement of category columns that is based on parent-child relationships. The supporting data table should contain a variable (column) for each item to be arranged in the hierarchy. Using your example, your data would need to be set up as follows. 

 

IDDescriptionTypeSubtype1Subtype2DateQuantity
0SAP. A NUM 34PRODUTOSSAPATOSSAPATO MARCA A10/25/2019200
1SAP. A NUM 36PRODUTOSSAPATOSSAPATO MARCA A10/25/2019150
2SAP. B NUM 32PRODUTOSSAPATOSSAPATO MARCA B10/25/2019250
3SAP. B NUM 36PRODUTOSSAPATOSSAPATO MARCA B10/25/2019130
4ROU. A SIZE 4PRODUTOSROUPASROUPA MARCA A10/25/2019200
5ROU. A SIZE 7PRODUTOSROUPASROUPA MARCA A10/25/2019150
6ROU. B SIZE 3PRODUTOSROUPASROUPA MARCA B10/25/2019250
7ROU. B SIZE 5PRODUTOSROUPASROUPA MARCA B10/25/2019130

View solution in original post

2 REPLIES 2
Robert_T
Fluorite | Level 6

A hierarchy is an arrangement of category columns that is based on parent-child relationships. The supporting data table should contain a variable (column) for each item to be arranged in the hierarchy. Using your example, your data would need to be set up as follows. 

 

IDDescriptionTypeSubtype1Subtype2DateQuantity
0SAP. A NUM 34PRODUTOSSAPATOSSAPATO MARCA A10/25/2019200
1SAP. A NUM 36PRODUTOSSAPATOSSAPATO MARCA A10/25/2019150
2SAP. B NUM 32PRODUTOSSAPATOSSAPATO MARCA B10/25/2019250
3SAP. B NUM 36PRODUTOSSAPATOSSAPATO MARCA B10/25/2019130
4ROU. A SIZE 4PRODUTOSROUPASROUPA MARCA A10/25/2019200
5ROU. A SIZE 7PRODUTOSROUPASROUPA MARCA A10/25/2019150
6ROU. B SIZE 3PRODUTOSROUPASROUPA MARCA B10/25/2019250
7ROU. B SIZE 5PRODUTOSROUPASROUPA MARCA B10/25/2019130
HugoVini
Obsidian | Level 7

@Robert_T, Thanks a lot for your answer.

 

My content is dynamic, I cannot control the relationships so I'm not sure that it could be done by my data.
Through my current table structure, each register pointing to his "parent", there is no way to work with hierarchies?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1090 views
  • 2 likes
  • 2 in conversation