# Como realizar contagem de datas específicas?

**URL:** <https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737>\
**Category:** Ask for Help\
**Created:** [April 19, 2024, 7:25pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737 "2024-04-19T19:25:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![julana](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julana/32/60756_2.png) [@julana](https://community.glideapps.com/u/julana)\
**Post date:** [April 19, 2024, 7:25pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/1 "2024-04-19T19:25:23Z")

</div>

Já fiz uma pergunta parecida uma vez, mas não conseguiram me ajudar. Novamente venho tirar a mesma dúvida, porém agora com datas (dia e mês).  
Preciso calcular a quantidade de vezes que uma data foi selecionada, tentei através do rollup, if-then-else (para calcular as vezes que forem true), mas não consegui de jeito nenhum. Poderiam me ajudar?

Ex.: Existem 5 linhas com a informação da data do dia 19/04/2024. Preciso realizar a contagem dessas 5 linhas, e que me traga o resultado correto.

---

<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:** [April 20, 2024, 1:34am UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/2 "2024-04-20T01:34:02Z")

</div>

Can you show us how your data is structured? What is the column where you need to count the dates?

---

<div class="post-metadata">

**Author:** ![julana](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julana/32/60756_2.png) [@julana](https://community.glideapps.com/u/julana)\
**Post date:** [April 22, 2024, 12:42pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/3 "2024-04-22T12:42:51Z")

</div>

Claro, posso sim.  
A coluna é essa:

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

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 22, 2024, 1:06pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/4 "2024-04-22T13:06:29Z")

</div>

- Create a math column that converts the date to a number without the time.

```auto
Year(Date) * 10^4
+ Month(Date) * 10^2
+ Day(Date)

```

- Create a relation column that links the math column to itself.
- Create a rollup column that gets the count from the relation.

---

<div class="post-metadata">

**Author:** ![julana](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julana/32/60756_2.png) [@julana](https://community.glideapps.com/u/julana)\
**Post date:** [April 22, 2024, 5:39pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/5 "2024-04-22T17:39:14Z")

</div>

Pode me dar um exemplo de como criar a coluna matemática convertendo a data, Jeff? Acho que eu entendi errado… devo primeiro separar a data em ano/mês/dia?

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

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 22, 2024, 5:40pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/6 "2024-04-22T17:40:27Z")

</div>

You did not enter the formula exactly as I have shown.

---

<div class="post-metadata">

**Author:** ![julana](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julana/32/60756_2.png) [@julana](https://community.glideapps.com/u/julana)\
**Post date:** [April 22, 2024, 5:46pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/7 "2024-04-22T17:46:04Z")

</div>

Sim, eu não entendi. Devo primeiro separar a data entre dia/mês/ano? Se eu colocar a fórmula direto, vai apresentar o erro informando a data. Pode me mostrar algum exemplo? Por favor…

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 22, 2024, 5:48pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/8 "2024-04-22T17:48:38Z")

</div>

If you enter the formula as I have shown, then you only need to replace ‘Date’ with the column that contains your date. The formula separates Year, Month, and Day and puts it all back together. You shouldn’t have to do anything extra.

---

<div class="post-metadata">

**Author:** ![julana](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julana/32/60756_2.png) [@julana](https://community.glideapps.com/u/julana)\
**Post date:** [April 22, 2024, 6:07pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/9 "2024-04-22T18:07:10Z")

</div>

Certo, obrigada! Deu certo agora, muito bom \<3

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [April 29, 2024, 6:07pm UTC](https://community.glideapps.com/t/como-realizar-contagem-de-datas-especificas/72737/10 "2024-04-29T18:07:38Z")

</div>

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