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

Hi All,

 

Is it possible to create a dynamic hierarchy in SAS 7.4? 

My requirement is that the the user should be able to interchange the levels of the hierarchy eg if Level 1 is Region and Level 2 is Product user can interchange Level 1 to be Product and Level 2 to be Region.

 

Thanks for the help. 

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Super FREQ

I don't think there is an easy or straightforward way to do this.

 

Possibly you could create a single hierarchy consisting of two calculated items. The expressions for those two items would each return a different category, based on a parameter value that is set by a button bar or drop-down list control.

 

I have not tried this, but I believe it should work.

 

The calculated expressions would look something like:

 

IF 'parameter'p = "A"

RETURN 'A'n

ELSE 'B'n

 

and the other one would be the opposite:

 

IF 'parameter'p = "A"

RETURN 'B'n

ELSE 'A'n

 

I'm not sure how useful this is, because only the values would be dynamic. The names of the hierarchy levels would not change.

View solution in original post

1 REPLY 1
Sam_SAS
SAS Super FREQ

I don't think there is an easy or straightforward way to do this.

 

Possibly you could create a single hierarchy consisting of two calculated items. The expressions for those two items would each return a different category, based on a parameter value that is set by a button bar or drop-down list control.

 

I have not tried this, but I believe it should work.

 

The calculated expressions would look something like:

 

IF 'parameter'p = "A"

RETURN 'A'n

ELSE 'B'n

 

and the other one would be the opposite:

 

IF 'parameter'p = "A"

RETURN 'B'n

ELSE 'A'n

 

I'm not sure how useful this is, because only the values would be dynamic. The names of the hierarchy levels would not change.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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
  • 1 reply
  • 551 views
  • 0 likes
  • 2 in conversation