# Vega-Lite Aggregate stopped working after upgrade to 7.10 (from 7.6)

**URL:** <https://discuss.elastic.co/t/vega-lite-aggregate-stopped-working-after-upgrade-to-7-10-from-7-6/258161>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [December 9, 2020, 4:30pm UTC](https://discuss.elastic.co/t/vega-lite-aggregate-stopped-working-after-upgrade-to-7-10-from-7-6/258161 "2020-12-09T16:30:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brunet/32/80525_2.png) [@brunet](https://discuss.elastic.co/u/brunet)\
**Post date:** [December 9, 2020, 4:30pm UTC](https://discuss.elastic.co/t/vega-lite-aggregate-stopped-working-after-upgrade-to-7-10-from-7-6/258161/1 "2020-12-09T16:30:55Z")

</div>

Dears,  
I had a nice bubble vizs with Vega Lite which stopped working after upgrading to 7.10.  
The \_docs are gathered ok from the index. But when transform/aggregate/sum is processed within Vega, undefined values appear everywhere.

Here the source\_0 well populated:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a8602d049ad587166a04757233b7528130aed8c8.png)

Here the data\_0 with undefined data:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/6/9610d52aafbbe734da19b5ef696ad9a7b1561fb5.png)

If i run debug at console and open nodes section I see when the data get lost....

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/7/2792da5bfe7f837c86defb07fcf872430f03ad99.png)

How the answer looks like:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ff6383727b1366b295cd8e780e6ec8a0c991a382.png)

It was working before the upgrade (vega lite v2 (kibana 7.6) ---\> vega lite v4 (kibana 7.10)).  
Any help would be very much appreciated.

Here the spec:

```auto
{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
   "data": {
    "url": {
      %context%: true
      %timefield%: @timestamp
      "index": anindex*
      "body": {
             _source: ["cost", "id1", "category1",]
       }
    }
   "format": { "property": "hits.hits" } 
  },
  "transform": [
    {
      "aggregate": [
      {
        "op": "sum",
        "field": "_source.cost",
        "as": "totalcost"
      },
      {
        "op": "distinct",
        "field": "_source.id1",
        "as": "id1qty"
      }
    ],
      "groupby": ["_source.category1"]
    },
    
    {
      "calculate": "datum.totalcost/datum.id1qty",
      "as": "cost_per_id1"
    }
]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 6, 2021, 4:31pm UTC](https://discuss.elastic.co/t/vega-lite-aggregate-stopped-working-after-upgrade-to-7-10-from-7-6/258161/2 "2021-01-06T16:31:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
