Quick question. Is it possible for you to do this on the backend, before bringing it into Tableau?
For example, writing a Query that Aggregates the Prescription Count to a Patient level, and then Joins those results to your Demographic Patient Dataset on Patient Identifier?
You can do this in Tableau by blending the datasources on the Patient Identifier, but it is not a true join, and you can run into problems if you need to do say, a COUNTD.
If possible, try to do this in the backend so that Tableau has a single flat file source to work with. This will "generally" give you the most flexibility. But if that is not possible use the Blend. For performance, you could also try pre-aggregating the Prescription Data during the Datasource creation so that you have 1 record per customer.
Thanks for the suggestion. The aggregate dataset needs to be a live connection so that the aggregates get updated as more claims come in, so creating the aggregation pre-Tableau won't work.