As you discovered, parameters are not connected to a data source. You might want to consider voting for https://community.tableau.com/ideas/1178 .
You should be able to do this via a calculation, but it is difficult to help without a sample of what you are doing. Can you attach a packaged workbook (.twbx)? Please see Attaching a Packaged Workbook.