1 of 1 people found this helpful
When creating calculations with fields from multiple data connections, all of the fields must be aggregated. For example:
IF SUM([BMI]) <= 35
AND SUM([PAT_AGE]) <= 80
AND SUM([RR part 1]) <= 15
AND MIN([OR_Extract].[ANES_TYPE_NM]) = "neuraxial block"
THEN Criteria Met"
ELSE "Inclusion Criteria NOT Met"
The issue you might encounter with the above calculation is that the aggregated fields may not return the value needed to evaluate the conditions. For example, if every row in the Tableau view is a hospital room, and there are 2 patients in a room (one aged 35 and the other 60), then SUM([PAT_AGE]) will be 95. The calculation will return "Inclusion Criteria NOT Met" for the entire room.
Thus, if you use the above calculation, you want to make sure your view has enough detail (aka every row should be a patient).
Another option would be to use cross-database joins rather than data blending. Data blending is an ad-hoc LEFT join where data from the secondary data is aggregated up to the level of detail in the view. This is why calculations with fields from a secondary data source must use aggregations.
Cross-database joins are a record level join, which means you can use fields from any table as normal. For more information about cross-database joins, see Combine tables from different databases
Hope this answers your question
Combine tables from different databases
Thank you so much for taking the time to review this and for providing me a way to make the calculation work.
It was the perfect Friday morning gift for me to receive.
Very much appreciated. This worked perfectly for me.
Have a great weekend.