How to count occurrences for the actual month

Hello,
unstead of this [Shopintegrations].Filter(Success=“yes”).Filter(Months=“November 2020”).Count() wich is working, I would like to geht the count for the actual month automatically. I have already tried a few other possibilities, but without success.
Thanks a lot.

Hey @Vincent_Guibert I’m not sure exactly what you are trying to do … a few things:

1 - try not to .filter().filter() - instead use .filter( x=y AND a=b)
2 - you can use .month() to get the integer value of a datetime. Pair it with today() and you can check .filter(Months.month()=today().month()) where Months is the datetime value in your original filter formula.

Good luck!

2 Likes

Hello,
I am sorry, I don’t manage to make it work.
Here is a dummy doc, I am thankfull if you have time to have a look.

Hi @Vincent_Guibert,

I had a look at your doc and provided a very basic implementation with a different approach.

If I correctly understood your issues, you need to have a date control over the different outcomes (please, point me in the right direction if otherwise).

To achieve that, I would take advantage of the powerful capability of Coda buttons for two reasons:

  1. They are more explicit from a UX perspective: people “expect” that something will happen
  2. You can add whatever logic you can based on that trigger, having a full fine grained control

At that point, you can modify your dataset accordingly to register all the intermediate and aggregate information.

Again, do let me know if this makes sense to you and if you need further details.

Edit:
I’m sorry: I messed up your doc by adding an additional column with an unsupported function
Please, use/copy this one, instead:
https://coda.io/d/Test-counting-pro-month_dmcHBtqGvE-/Action-Approach_susTs#_luT3W.

Sorry for the inconvenience.

Hello Federico,
thank you for your approach, but it is not really what I am looking for.
This screenshot will probably help to understand.


Do somebody have an idea how to show a number as a result of a Success status and the actual month?
Thanks a lot in advance,
Vincent

Hi @Vincent_Guibert ,
try this:

Shopintegrations | France
   .Filter(Success="yes" AND Months.Month() = Today().Month())
      .Count()

Let me know if this helps.
Cheers!