The rank option in the right panel comes in handy.
But how can I use a rank-by construct?
In a data step I would i.e. apply the "first" function to reset the rank counter on the aggregated data like an output of proc freq.
But in VA I don't know how to solve it.
I was trying around with aggregated data source + aggregated cell, but I do not succeed in resetting every time a new outer group starts.
@Sam_SAS any idea? Thanks a lot in advance
Hello,
I'm not sure I understand what you want to do. Your workaround with the cumulative total seems to provide a line number, but did you want this number to start over at one for each value of the TMA category?
Sam
Thanks for replying to me call 🙂
Yes, indeed, I want to filter the object by those TMAIMGs that are the TOP3 most frequent BY their TMA group.
If I use the rank option with TOP3 and add the TOP3 by TMA, the result is not satisfactory.
Therefore I thought about creating a rank that starts over for every new TMA group. This value I could use in the filter i.e.
Thanks for the clarification, I understand the goal now.
I am not sure of how to do this in VA, unfortunately. Someone else might know a way.
Sam
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!
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.