# Frequência acumulada

**URL:** <https://community.glideapps.com/t/frequencia-acumulada/29416>\
**Category:** Ask for Help\
**Created:** [July 22, 2021, 1:07am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416 "2021-07-22T01:07:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![eusamuelaf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eusamuelaf/32/29385_2.png) [@eusamuelaf](https://community.glideapps.com/u/eusamuelaf)\
**Post date:** [July 22, 2021, 1:07am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/1 "2021-07-22T01:07:03Z")

</div>

Pessoal, alguém sabe como é possível fazer uma frequência acumulada com incremento? Quero pegar o valor da linha anterior e somá-lo com o incremento que escolher (+1, por exemplo). Abraços!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 22, 2021, 1:11am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/2 "2021-07-22T01:11:58Z")

</div>

Hi Samuel, welcome to the community!

I assume you’re adding rows either with a form or an add row action. Let’s call your incremental column “Number”.

You will have a “Next Number” column that is a math column with the formula Number + 1. Point the Number part to the Number column.

When you use an add row action or a form, use a screen value (if you’re writing new rows from a details view), point to the “Next Number” screen value and write to the Number column for the new row.

If you’re adding from a list view, you may want to create a rollup column instead to take the max number from the “Number” column, then use the same “Next Number” approach above.

---

<div class="post-metadata">

**Author:** ![eusamuelaf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eusamuelaf/32/29385_2.png) [@eusamuelaf](https://community.glideapps.com/u/eusamuelaf)\
**Post date:** [July 22, 2021, 2:18am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/3 "2021-07-22T02:18:21Z")

</div>

Olá, obrigado pela rápida resposta. Com a imagem abaixo, gostaria que ocorresse a soma entre a linha anteior (5) “ORGANIZAÇÃO” e o incremento escolhido (por exemplo, 2), resultasse em 7 como o dado da primeira linha da mesma tabela.

Ao invés de apenas utilizar o incremento 2 isolado, gostaria que ele fosse somado com o resultado da linha anterior.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/d/9dc05ba9cf6d6ec687ea3a2019a4e3a58fde20e3.png)

Abraços!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 22, 2021, 2:25am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/4 "2021-07-22T02:25:32Z")

</div>

@Lucas_Pires or any Portuguese/Spanish speakers, can you help with this case? I’m not entirely sure about the translation.

---

<div class="post-metadata">

**Author:** ![eusamuelaf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eusamuelaf/32/29385_2.png) [@eusamuelaf](https://community.glideapps.com/u/eusamuelaf)\
**Post date:** [July 22, 2021, 2:37am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/5 "2021-07-22T02:37:27Z")

</div>

The “ORGANIZATION” column receives data from an increment via a button. For example, in the last line of the “ORGANIZATION” column in the image above, the data is 5. In the next line, in a form, I will enter a specific increment (2, for example). I would like the data on this line to be 7 (5 from the previous line + 2 from the new increment) and not 2 as it is being registered (only the increment is registered). Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 22, 2021, 3:52am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/6 "2021-07-22T03:52:28Z")

</div>

So what you enter in the form is the increment, and then you want to retrieve the value from the previous row to have a final sum between the two?

---

<div class="post-metadata">

**Author:** ![eusamuelaf](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eusamuelaf/32/29385_2.png) [@eusamuelaf](https://community.glideapps.com/u/eusamuelaf)\
**Post date:** [July 22, 2021, 11:15am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/7 "2021-07-22T11:15:17Z")

</div>

That’s right!!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 22, 2021, 11:35am UTC](https://community.glideapps.com/t/frequencia-acumulada/29416/8 "2021-07-22T11:35:10Z")

</div>

Then what I would do is:

- Add a rowID column if you haven’t done so.
- Add a “previous rowID column”.
- Use the current rowID’s column (if you add it through the details view) to set to the new row’s previous rowID column in an add row action/form environment.
- If you use a list view, retrieve the last rowID through a single value column, then do the same thing as above.
- Through the previous rowID column, make a relation and a lookup to retrieve the previous row’s “number”.
- Use a math column to sum the number retrieve above with the increment number you add through the form.
