Is is possible to use different drill down levels in one crosstab?
Example:
I have a hierarchy following the structure of this example: Mammal -> Dog -> Labrador
What i want is a crosstab like this:
- Mammal
- Dog
- Labrador
Cat
As you can hopefully understand. I want to be able to drill down on dog, but not on cat for some reason. Is something like this remotely possible? I'm using SAS VA 7.4.
Hm, i don't think you can have different length/depth/levels on the branches.
One thing you can do is to create your own categories and apply a rule in them so that the next level is the same as the one before:
- Mammal
- Dog
- Labrador
Cat
- Cat
Lets say you have the following categories:
- Level1 (mammal)
- Level2 (dog,cat)
- Level3 (labrador)
Then you would create a new level3, lets say level3_new 🙂 and do the calculation:
if level2 = cat then cat
else level3
In the cross tab you will have all levels but for cat you will get the same value for level2 and 3, might help you 🙂 ?
//Fredrik
Thanks for the help Fredrik.
This is indeed how I resolved the issue at the moment.
I'm glad you found some useful info @Schwami! If Frederik's reply was the exact solution to your problem, can you "Accept it as a solution"? This will help other community members who may run into the same issue know what worked.
Thanks!
Anna
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.