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?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 1019 views
  • 2 likes
  • 2 in conversation