DATATABLE DAX Function (Table manipulation)
Returns a table with data defined inline.
Syntax
Parameter | Attributes | Description |
---|---|---|
name | Repeatable |
A column name to be defined. |
type | Repeatable |
A type name to be associated with the column. |
data |
The data for the table. |
Return values
A table declaring an inline set of values.
Remarks
Unlike DATATABLE, Table Constructor allows any scalar expressions as input values.
The syntax used by DATATABLE is different from that used by Table Constructor.
Examples
Segments_Datatable = DATATABLE ( "Price Range", STRING, "Min Price", CURRENCY, "Max Price", CURRENCY, { { "Low", 0, 10 }, { "Medium", 10, 100 }, { "High", 100, 9999999 } } )
Related articles
Learn more about DATATABLE in the following articles:
-
Create Static Tables in DAX Using the DATATABLE Function
You can create static tables in DAX using the DATATABLE function. This article describes the syntax of this new feature and shows when and how to use it. » Read more
-
Understanding data lineage in DAX
Data lineage is such a well-implemented DAX feature that most developers use it without knowing about it. This article describes data lineage and how it can help in producing better DAX code. » Read more
Last update: Jan 11, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/datatable-function