Power BI: calculate a specific criteria automatically for the current month

This formula allows me to calculate a particular criteria for the current month in an automatic way instead to use manually the filter option (it can be used also to calculate the current year). I mean, imagine, we are in September and I want to know how many P1 in this current month, I can use the filter, in this case, next month, manually, I have to change the filter. This formula will do automatically without using the filter.


For the current year, just replace “month” by “year”.

For instance:


Interesting Management