TOJSON is a DAX function that converts the records of a table into a JSON text format.
Syntax
TOJSON(
Table,
MaxRows
)
Argument
Properties
Description
Table
The table to be converted.
MaxRows
Optional
The maximum number of rows to be converted. A negative number means all rows are converted. Default is 10.
Return Values
A string with JSON representation of the table. The representation contains column names as “header”, count-of-rows as “rowCount”, and values as “data”.