EXTERNALMEASURE DAX Function

Invoke a measure defined in a remote model.

Syntax

EXTERNALMEASURE ( <MeasureName> [, <Type>] [, <Datasource>] )
Parameter Attributes Description
MeasureName

Name of the measure as defined in the remote model.

Type Optional

A type name to be associated with the measure: BOOLEAN/LOGICAL, CURRENCY/DECIMAL, DATETIME, DOUBLE, INTEGER/INT64, STRING/TEXT, VARIANT.

Datasource Optional

The name of external data source executing the measure.

Return values

Scalar A single value of any type.

The result of the remote measure.

Remarks

A composite model defines a local version of the measures that reference measures in remote models by using EXTERNALMEASURE. Power BI automatically defines these local measures when a composite model is created or updated.

EXTERNALMEASURE works only in a composite model that has a DirectQuery connection to a remote model, such as a Power BI semantic model or an Analysis Services model. In a model without this type of connection, DAX does not recognize the function name and the expression returns an error.

Only MeasureName is required. Type and Datasource are optional.

Type is one of the keywords listed in the parameter description, without quotes. MeasureName and Datasource are text values. Datasource is the name of the remote model connection in the composite model.

Examples

--  A local measure in a composite model returns the result of the
--  Sales Amount measure of the remote model.
--  Only MeasureName is required. Type and Datasource are optional.
--  This example uses only MeasureName. The code works only in a
--  composite model, so it has no dax.do link.
Sales Amount Remote =
EXTERNALMEASURE ( "Sales Amount" )

Last update: Nov 19, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber, Ming Han Teh

Microsoft documentation: https://learn.microsoft.com/en-us/dax/externalmeasure-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of EXTERNALMEASURE? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.