# Organizing multiple-tagged data?

**URL:** <https://community.influxdata.com/t/organizing-multiple-tagged-data/32104>\
**Category:** Systems\
**Tags:** influxdb, schema, query\
**Created:** [November 10, 2023, 3:17pm UTC](https://community.influxdata.com/t/organizing-multiple-tagged-data/32104 "2023-11-10T15:17:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fira](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/fira/32/14578_2.png) [@fira](https://community.influxdata.com/u/fira)\
**Post date:** [November 10, 2023, 3:17pm UTC](https://community.influxdata.com/t/organizing-multiple-tagged-data/32104/1 "2023-11-10T15:17:39Z")

</div>

Hello! Working with a small project and I’m having difficulties using the exported data, could use some advice!

The usecase: we have multiple-tagged data that we want to aggregate and graph by mean/sum

Picture a bakery selling pastries. They want to keep track of inventory by categories, such as “flavour” and “type”. An example intake in influx would look like this:

inventory,type=croissant,flavour=plain count=42 t=0  
inventory,type=donut,flavour=chocolate count=30 t=0  
inventory,type=donut,flavour=vanilla count=15 t=0

inventory,type=croissant,flavour=plain count=38 t=1  
inventory,type=donut,flavour=chocolate count=26 t=1  
inventory,type=donut,flavour=vanilla count=12 t=1

…etc

Now if you do simple graphing with flux or influxql summing to eg display total of donuts over time, it looks fine at first, but when you zoom out, the time window eventually covers several data batches, multiplying quantities!

What’s the correct way to do this?

You could MAYBE coalesce it all into a single measurement eg  
inventory count\_croissant=40,count\_donut\_vanilla=30,count\_donut\_chocolate=12 0

But that completely defeats the point for aggregating

Any advice? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [November 15, 2023, 12:13am UTC](https://community.influxdata.com/t/organizing-multiple-tagged-data/32104/2 "2023-11-15T00:13:12Z")

</div>

Hello @fira,  
What is the Flux query that you’re using?  
It seems like you might be using the aggregatewindow() function with a default window period value, which will aggregate based on how long your querying data for.  
If you remove that function in the script editor you will get your raw data.  
Does that help?
