Skip to main content

Tuple Values

Tuple Values

Every tuple has a value (which might be null).

The value of a tuple is determined as follows:

  1. The system finds the rows in the fact table that correspond to all the non-measure members used in the tuple expression.

  2. The system then finds values for those rows as follows:

    • If the tuple expression includes a specific measure, the system finds the value of that measure for each relevant row of the fact table.

    • If the tuple expression does not include a specific measure, the system uses the default measure (typically, %COUNT).

  3. The system aggregates those values together, using the aggregation function specified for the measure.

For example, consider the following tuple:

(homed.32006,colord.red,allerd.[dairy products],MEASURES.[avg test score])

To determine the value of this tuple, the system finds all the patients in the fact table that belong to the 32006 ZIP code, and whose favorite color is red, and who are allergic to dairy products. The system then accesses the values for the Test Score measure for those patients and averages those values.

For another example, consider the following tuple (permitted in InterSystems MDX):

(allerd.soy,allerd.wheat)

To determine the value of this tuple, the system counts the patients who are allergic to both soy and to wheat.

Finally, consider the following tuple:

(homed.juniper,homed.centerville)

To determine the value of this tuple, the system counts the patients whose home city is Juniper and whose home city is Centerville. The value of this tuple is null, because each patient has one home city.

FeedbackOpens in a new tab