Dataset properties

 

Updated: March 23, 2017

The current v1 of datasets API only allows for a dataset to be created with a name and a collection of tables. Each table can have a name and a collection of columns. Each column has a name and datatype. We are greatly expanding these properties most notably with support for measures and relationships between tables. The complete list of supported properties for this release is as follows:

System_CAPS_ICON_important.jpg Important


It can be accessed at https://api.powerbi.com/v1.0/myorg/datasets. Please provide feedback at Power BI Community.

System_CAPS_ICON_note.jpg Note

Try creating a new dataset without writing any code at Power BI on Apiary .

NameTypeDescriptionRead OnlyRequired
idGuidSystem wide unique identifier for the dataset.TrueFalse
nameStringUser defined name of the dataset.FalseTrue
tablesTable[]Collection of tables.FalseFalse
relationshipsRelationship[]Collection of relationships between tables.FalseFalse
defaultModeStringDetermines whether the dataset is pushed, streamed, or both, with values of "Push", "Streaming", and "PushStreaming".FalseFalse
NameTypeDescriptionRead OnlyRequired
nameStringUser defined name of the table. It is also used as the identifier of the table.FalseTrue
columnscolumn[]Collection of columns.FalseTrue
measuresmeasure[]Collection of measures.FalseFalse
isHiddenBooleanIf true, table will be hidden from client tools.FalseFalse
NameTypeDescriptionRead OnlyRequired
nameStringUser defined name of the column.FalseTrue
dataTypeStringSupported EDM data types and restrictions. See Data type restrictions.FalseTrue
formatStringStringA string describing how the value should be formatted when it is displayed. To learn more about string formatting, see FORMAT_STRING Contents.FalseFalse
sortByColumnStringString name of a column in the same table to be used to order the current column.FalseFalse
dataCategoryStringString value to be used for the data category which describes the data within this column. Some common values include: Address, City, Continent, Country, Image, ImageUrl, Latitude, Longitude, Organization, Place, PostalCode, StateOrProvince, WebUrlFalseFalse
isHiddenBooleanProperty indicating if the column is hidden from view. Default is false.FalseFalse
summarizeByStringDefault aggregation method for the column. Values include: default, none, sum, min, max, count, average, distinctCountFalseFalse
NameTypeDescriptionRead OnlyRequired
nameStringUser defined name of the measure.FalseTrue
expressionStringA valid DAX expression.FalseTrue
formatStringStringA string describing how the value should be formatted when it is displayed. To learn more about string formatting, see FORMAT_STRING Contents.FalseFalse
isHiddenStringIf true, table will be hidden from client tools.FalseFalse
NameTypeDescriptionRead OnlyRequired
nameStringUser defined name of the relationship. It is also used as the identifier of the relationship.FalseTrue
crossFilteringBehaviorStringThe filter direction of the relationship: OneDirection (default), BothDirections, AutomaticFalseFalse
fromTableStringName of the foreign key table.FalseTrue
fromColumnStringName of the foreign key column.FalseTrue
toTableStringName of the primary key table.FalseTrue
toColumnStringName of the primary key column.FalseTrue

Data typeRestrictions
Int64Int64.MaxValue and Int64.MinValue not allowed.
DoubleDouble.MaxValue and Double.MinValue values not allowed. NaN not supported.+Infinity and -Infinity not supported in some functions (e.g. Min, Max).
BooleanTrue or False.
DatetimeDuring data loading we quantize values with day fractions to whole multiples of 1/300 seconds (3.33ms).
StringCurrently allows up to 4000 characters per string value.
Decimalprecision=28, scale=4

The following code sample includes a number of these properties:

{

  "name": "PushAdvanced",

  "tables": [

    {

      "name": "Date",

      "columns": [

        {

          "name": "Date",

          "dataType": "dateTime",

          "formatString": "dddd\\, mmmm d\\, yyyy",

          "summarizeBy": "none"

        }

      ]

    },

    {

      "name": "sales",

      "columns": [

        {

          "name": "Date",

          "dataType": "dateTime",

          "formatString": "dddd\\, mmmm d\\, yyyy",

          "summarizeBy": "none"

        },

        {

          "name": "Sales",

          "dataType": "int64",

          "formatString": "0",

          "summarizeBy": "sum"

        }

      ],

      "measures": [

        {

          "name": "percent to forecast",

          "expression": "SUM(sales[Sales])/SUM(forecast[forecast])",

          "formatString": "0.00 %;-0.00 %;0.00 %"

        }

      ]

    },

    {

      "name": "forecast",

      "columns": [

        {

          "name": "date",

          "dataType": "dateTime",

          "formatString": "m/d/yyyy",

          "summarizeBy": "none"

        },

        {

          "name": "forecast",

          "dataType": "int64",

          "formatString": "0",

          "summarizeBy": "sum"

        }

      ]

    }

  ],

  "relationships": [

    {

      "name": "2ea345ce-b147-436e-8ac2-9d3c4d82af8d",

      "fromTable": "sales",

      "fromColumn": "Date",

      "toTable": "Date",

      "toColumn": "Date",

      "crossFilteringBehavior": "bothDirections"

    },

    {

      "name": "5d95f419-e589-4345-9581-6e70670b1bba",

      "fromTable": "forecast",

      "fromColumn": "date",

      "toTable": "Date",

      "toColumn": "Date",

      "crossFilteringBehavior": "bothDirections"

    }

  ]

}

Show: