Best approach to calculation problem
For PowerBI DirectQuery you'll need to write a single view that returns all the data.  Internally you might use a table-valued function if that is convenient.

If the execution of the queries against the view is too expensive, you'll have to cache the results, either by loading them into a table, or by switching from DirectQuery to Import mode.

David