1

I am using a measure field in my custom visual and want to display its aggregated value. However, when inspecting the dataview object, I noticed that the aggregates are always minLocal and maxLocal, and the queryName is always set to "Sum(...)" even when the user has selected a different aggregation type like average.

Here's a screenshot of the dataview object for reference:

image

Here is measure from capabilities.json file:

{
      "name": "primaryMeasure",
      "kind": "Measure",
      "displayName": "Measure",
      "description": "Primary measure",
      "requiredTypes": [
        {
          "numeric": true
        }
      ]
    },

and I want to display the aggregated value of the measure in my visual. But in the dataview, the aggregates are always minLocal and maxLocal. even the queryName is always Sum(..., even if I select average:

I also added this as issue in GitHub/PowerBI-visuals-tools:

How to determine the aggregation type of a measure field in a Power BI custom visual

I want to know if there's a way to programmatically determine the aggregation value for the measure field without relying on assumptions based on the displayName.

Rahul Roy
  • 275
  • 1
  • 10

0 Answers0