# Categorizing values

**URL:** <https://community.grafana.com/t/categorizing-values/49299>\
**Category:** Grafana\
**Created:** [June 22, 2021, 8:58am UTC](https://community.grafana.com/t/categorizing-values/49299 "2021-06-22T08:58:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdiet](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mdiet](https://community.grafana.com/u/mdiet)\
**Post date:** [June 22, 2021, 8:58am UTC](https://community.grafana.com/t/categorizing-values/49299/1 "2021-06-22T08:58:06Z")

</div>

Hi there,

I am trying to match single values in grafana into categories. For example:  
If the value is between 1 and 3, I want to transform it into a 1.  
4-8 → 2  
9-15 → 3  
16-25 → 4  
…  
So if a value is in a specific range, I want to transform it into the number of this category.

This works perfectly with value mapping.  
BUT: I need to reuse this new values in another panel because I need to calculate with it.

When using value mapping and linking to another panel, I always get the original values not the mapped ones.

How can solve this?  
Or is there any other possibility than using value mapping (e.g. with transformation?)

I would be glad to get some advice.

Thanks!

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [June 30, 2021, 7:19pm UTC](https://community.grafana.com/t/categorizing-values/49299/2 "2021-06-30T19:19:27Z")

</div>

Hi @mdiet

I too have noticed that things get a little wonky if try to pass value mappings to another dashboard. What is the datasource that is storing these values? In such a situation, it might be easiest to perform these calculations on the db site, and then simply import those new values to grafana alongside the others

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [June 22, 2022, 8:58am UTC](https://community.grafana.com/t/categorizing-values/49299/3 "2022-06-22T08:58:50Z")

</div>

Closed on June 22, 2022, 8:58am UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
