# Difference b/w Aggregate & joinaggregate in vega-lite

**URL:** <https://discuss.elastic.co/t/difference-b-w-aggregate-joinaggregate-in-vega-lite/263826>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [February 10, 2021, 6:00am UTC](https://discuss.elastic.co/t/difference-b-w-aggregate-joinaggregate-in-vega-lite/263826 "2021-02-10T06:00:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [February 16, 2021, 4:12pm UTC](https://discuss.elastic.co/t/difference-b-w-aggregate-joinaggregate-in-vega-lite/263826/2 "2021-02-16T16:12:16Z")

</div>

I think you might be working on the same spec as another Discuss user who I helped out:

> [@Sum operator in stacked bar vega](https://discuss.elastic.co/t/sum-operator-in-stacked-bar-vega/263722/3):
>
> Hi @wylie The main visualization I require is % graph by dividing sum of StatusOpen/ sum of StatusSent, which was not giving expected output in vega-lite. So just wanted to check ouput for simple graph ( with sum of single field). Tried the same spec using sample data, it was giving correct results { "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "description": "Vega-Lite version of bar chart from https://observablehq.com/@d3/learn-d3-scales.", "width": 400, "data…

---

_[View the full topic](https://discuss.elastic.co/t/difference-b-w-aggregate-joinaggregate-in-vega-lite/263826)._
