It sounds like you are trying to do something similar to this - Creating a Dynamic “Parameter” with a Tableau Data Blend | Drawing with Numbers
Let us know if that is right and helps you out.
You are correct that Tableau will query both data sources regardless of the selection in the parameter. You may consider using a parameter to swap sheets rather than swapping measures. See Create a Sheet Selector for a Dashboard
This whitepaper has some good information on exactly how parts of Tableau works (e.g. example queries generated by different filter types) https://www.tableau.com/sites/default/files/whitepapers/designing-efficient-workbooks-v10.0.pdf
These are pretty basic, but you might also check out Best Practices for Creating Calculations in Tableau and Create Efficient Calculations
Hope this helps