SUBSTITUTEWITHINDEX

Updated on

SUBSTITUTEWITHINDEX is a DAX function that returns a table representing the semijoin of two tables with common columns replaced by a 0-based index column.

Syntax

SUBSTITUTEWITHINDEX(
   Table,
   Name,
   SemiJoinIndexTable,
   [ Expression, ... ],
   [ Order, ... ]
)
Argument Properties Description
Table Table to be modified.
Name A name of the column to be added to the first table.
SemiJoinIndexTable Table that will be ordered and used to calculate index and to join with the first argument.
Expression Repeatable Order by expression for the second parameter (SemiJoinIndexTable).
Order Optional, Repeatable The order to be applied. 0/FALSE/DESC – descending; 1/TRUE/ASC – ascending.

Return Values

A table which includes only those values present in the indexColumnsTable table and which has an index column instead of all columns present (by name) in the indexColumnsTable table.

Remarks

  • This function does not guarantee any result sort order.

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Empty

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/substitutewithindex-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy