Home / Power BI / Creating a table using Datatable DAX function

Creating a table using Datatable DAX function

General category image - Addend Analytics

Social Shares

  • Tables can be created using DAX function which is datatable().
  • Returns a table with data defined inline.
  • Datatable function allows values to be entered which is specific to the defined datatype only.
  • Instead of using “Enter Data” option in Microsoft Power BI, this function can be used to restrict the garbage value in a column.
  • Table can be viewed in Data View/ Table View in Power BI desktop.
  • It can be used in creating DAX measures as well.

Table Creation using DATATABLE()

  • Column names and their datatype need to be defined in the first section of the function.
  • In the second part which is after opening the curly brackets, data must be entered in a way that it represents each row of the table.

Output:

A screenshot of a computer

Description automatically generated

Author By

Gaurav Lakhotia
Manager - Data Analytics & Engineering at  | gaurav.l@addendanalytics.com

Gaurav holds an MBA in Business Analytics. As a data geek and avid learner, he has earned accolades including Microsoft Certified Data Analyst, Microsoft Certified Azure Administrator, and active Power BI Community contributor. He is also a Microsoft Certified Trainer. With critical thinking and project delivery skills, he strives to achieve customer delight in Data Analytics projects. Gaurav loves travelling with friends when he is not busy working on data.

Author By

Picture of Gaurav Lakhotia

Gaurav Lakhotia

Gaurav holds an MBA in Business Analytics. As a data geek and avid learner, he has earned accolades including Microsoft Certified Data Analyst, Microsoft Certified Azure Administrator, and active Power BI Community contributor. He is also a Microsoft Certified Trainer. With critical thinking and project delivery skills, he strives to achieve customer delight in Data Analytics projects. Gaurav loves travelling with friends when he is not busy working on data.

Decision-Ready Analytics

Turn your OEE dashboard into a decision system.

Book a 30-minute working session with our manufacturing analytics team.
Translate »