Pivot Distinct
You can display the types of values displayed in the pivot as unique values.
Set unique values
To set the display of unique values, set Value Type (opens in a new tab) of the setPivotFields function to "distinct".
pivot.setPivotFields({
columns: ["Major Category", "Medium Category"],
rows: ["Material classification", "Description", "Classification"],
values: [{
name: "Baseline value",
expression: "sum"
}, {
name: "N/A",
expression: "distinct"
}]
});
Unique data
Displays data and images in the form of HTML tags in cells. Unique data is displayed in a cell only when all identical items have the same data.
// display image
{
"fieldName": "<img src='images/uncheck.png'>"
...
}
// display string
{
"fieldName": "<font color='blue'>▼</font>"
...
}