The title says it all. Working on a use case where I need to trim both the top and bottom of a dataset at every new run. It is not fixed how much will be removed every run, just 'N' amount of records.
I was able to discard the first N records using this post. However, I am not sure how the last few can be removed. I looked up the documentation and the negative sign does not work (atleast the way I need it to). This is my first time using SPSS, so any help is welcome. Thanks!
The easiest way to do this would probably be to sort your data so that the last 5 records become the first 5 records and then follow the instructions from the referenced post.
Alternatively, you can use the
Aggregatenode to get the total number of records in the dataset and then merge that number back into your primary dataset. You can use theSelectnode with the condition(count - @INDEX - 1) <= Nwhere 'count' is the field with the total number of records in the dataset andNis the number of records that you are looking to discard.