Get month of object date

Hi I have a list of objects which have a DateTime as an attribute.  I need to work out the average number of objects per month over the last 12 months. The problem occurs in that there isnt currently 12 months of data so a simple div 12 doesnt work yet.  How can i establish quickly in my microflow how many months in the past 12 have data?
1 answers

Hi Dan,

You could calculate the number you have to divide with: create a variable, and check per month (object?) if it has any data. you could use retrieves or filters for this. If there is data, add 1 to the variable. This way, if only six months have data for instance, the variable value will be six and you'll divide by six.

There are more checks you can add (to exclude situations like having data one month, but none the next) but it's up to you how complex/extensive this should be.

Good luck!