当创建多维数据集并选择 sum 时,它会在输出为 json 时在 value 上下文中返回 sum 和 count。如何关闭它以便只返回总和值?
//define cube pivot
var cubeData = new PivotData(
new[] { "CloseDate", "StageName", "Type", "OpportunityName","Industry", "IsClosed", "IsWon" },
new SumAggregatorFactory("Amount"),
true);
json = new
{
cubeData,
};
return json;
输出显示
"cubeData": [
{
"key": [
"2019-07-05T00:00:00",
"Stage Value",
"Type Value",
"Opportunity Name Value",
"Industry Value",
false,
false
],
"value": {
"value": 35000.0,
"count": 1
}
},