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.
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.
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.