Using the Mean expression value I don’t believe you will be able to exclude values. I believe for what your looking for you would have to create a script instead of just using an expression. Or if your pulling the dataset through a query you could have an extra query feeding a custom property that isn’t displayed on the page. If you did the custom property, after limiting it down then you could use the MEAN() expression.
If you need to script it, you have a few options. You can loop through your data and store the row indexes you want to remove then use the system.dataset.deleteRows() function to create your new data set and write it into a custom property then do your mean function. For this though you would need a custom property to hold your filtered dataset and one to run your mean function from.
What I would do though is loop through your dataset and create a list of the values you want. Then use the system.math.mean() function to return the mean value your looking for.