Edit

Share via


EXTERNALMEASURE

Applies to: Calculated column Calculated table Measure Visual calculation

Invokes a measure defined in a remote model and returns its result with the specified datatype.

Syntax

EXTERNALMEASURE(<measurename>, <datatype>, <connection>)
ms.custom: AW2020Example

Parameters

Term Definition
measurename Name of the measure as defined in the remote model.
datatype An enumeration that includes: BOOLEAN/LOGICAL, CURRENCY/DECIMAL, DATETIME, DOUBLE, INTEGER/INT64, STRING/TEXT, VARIANT.
connection The name of the connection to the remote model.

Return value

Result of the remote measure with the datatype specified in datatype.

Remarks

Example

If the remote model connection is called DirectQuery to AS - Adventure Works DW 2020 and the remote model defines a measure called Total Sales you can invoke that measure and return its result as currency using:

Total Sales Remote = EXTERNALMEASURE("Total Sales", CURRENCY, "DirectQuery to AS - Adventure Works DW 2020")

Composite models