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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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