Allowing users to create calculated views I am using Views 3 and I was able to do some math on the fields using the "Views Custom Field" module that was recommended to me.  

It works perfectly and does exactly what I want it to do, but my problem is that I need to grant access to users to create views and calculations on them.  Views custom field is not really a math only field, it's basically allowing them to execute PHP code directly on my site, which I suspect is dangerous. 

Also, another requirement is that they are not directly modifying the actual data, but creating a view for themselves(or to share) that derived from this data. That means the view they create must somehow be connected to their ID and not modify the master data.

I don't know if it is the best approach, but I was thinking of using something like phpexcel and exposing the tables so they can link to certain data; it seems complicated for me and even more complicated for the users. 

How would you approach this?
You are right, you shouldn't allow people to change php code on your site. 

I would allow a lot of customization to the data that is returned via views filters. 

You can return the data in a table format and allow this table to be exported to excel or csv (there are views modules for both of these). Then people can create whatever they want. 

There are a few js libraries which can give you spreadsheet like functionality in the browser with an HTML table, that may be an option too.