02-22-2017 07:18 AM
I've got a filter setup that takes a parameter value and filters on a rank to include everything less than or equal to the parameter value. What I'm doing is letting the user decide how many results they want to see, eg a Top 10 list. This works perfectly, but for some of my rankings I'm interested in both the Top 10 rankings and the bottom 10 rankings, the top rankings represent increases, the bottom 10 represent decreases.
The top 10 is relatively easy as it's always going to be rankings 1 to 10, but the bottom 10 will always be MAX(Ranking) to MAX(Ranking)-10, I don't know how to modify my filter to reflect that. Does anyone have any ideas? I'm working in EG5.1
I can go back to the step where I'm adding my rankings and add another computed column for the inverse rankings, but I'd rather avoid this if possible as it means adding another 15 columns of data to an already large dataset and the information is already in the dataset.
03-02-2017 06:20 AM
You could pull the SAS code from the task that generates the top records...then add a program task to do the same but for the bottom records.
If you are not a SAS programmer, you could post that code and someone could help you re-arrange it to get your results
03-02-2017 10:06 AM
Hello I tried that, but couldn't find the code anywhere, it's not accessible in the Rank Task like it is from Query Builder. Any pointers wold be appreciated as it would be useful to be able to get the code from these data tasks in future.
I did get around my specific issue by duplicating all my ranking tasks and ticking the box that reverses the result, but it's not very elegant!
03-02-2017 10:50 AM
Glad you got a solution. The code is inside the task, bottom left (Preview code button).
Post what you have and explain how you wish to change it. (I used 6.1 but it is also in 5.1)