Quantcast
Viewing all articles
Browse latest Browse all 48596

Table Dataview dosent get totals with it.

Hello,

As per https://github.com/Microsoft/PowerBI-visuals/wiki/DataView-Introduction Table DataView should carry totals within it.

But I tried both in desktop and web version but it dosent workout for me. This property is always undefined.

I want to get the totals for column (when user selects Average or SUM or Minimum or Maximun etc).

I also looked into the aggregates but it gives only min & max. Subtotal is always undefined.

 

I am using below capabilities

dataRoles: [{
displayName: 'Values',
name: 'Values',
kind: VisualDataRoleKind.GroupingOrMeasure
}],
dataViewMappings: [{
table: {
rows: {
for: { in: 'Values' },
dataReductionAlgorithm: { window: { count: 100000 } }
},
rowCount: { preferred: { min: 1 } }
},
}],

Example code:

public update(options: VisualUpdateOptions) {
options.dataViews[0].table.totals;
options.dataViews[0].table.columns[0].aggregates.min;
options.dataViews[0].table.columns[0].aggregates.max
options.dataViews[0].table.columns[0].aggregates.subtotal;
}

 

Any Ideas?

 


Viewing all articles
Browse latest Browse all 48596

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>