My ideal situation is that I can create a web part with a dropdown. Each choice in the dropdown will correspond to a view created on a list. Once the user selects an item from the dropdown, my web part will get only the items that match that view's filters returned. I'll then calculate based on that and display results accordingly.
example: User creates views for 2010 new purchases 2009 new purchases. I'd have a dropdown on a web part with 2 choices, then user selects 1 and only the matching items are returned. I'd then calculate based on the subset returned and return my results.
What I am trying to accomplish is a workaround for calculating column totals on 'Calculated Fields'. A solution I saw posted earlier had a top comment of 'this does not work with currency', which is unacceptable.
I have 1 big list and maybe 20 views saved. We have price information calculated based on several columns. One of the columns, "current value", will not total because it is calculated.
Sure, I can write CAML for each specific query, but what I'm wondering is if there's a way that I can use an existing view / the CAML that view uses, so that my list's users can create a view and save it, and then go to this web part and select that view to get the calculated total.