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 Employee

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 Employee

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.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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