Detecting and defining per-month usage periods in multi-month data

Hello @Cardinal_Fire
I can’t say your problem is simple but i may suggest you an approach. You need another input that it will be your billing reporting granularity.

Then you have to run queries [ i guess in loops ] for each billing period and extract from each record in your data a billable time range applicable for the month. Then it doesn’t mind if a record has been working for months.

In each of the loop iterations you will have to calculate Effective.Starting and Effective.Ending for the billing period. In the case of ‘out of range’ you will apply the period starting or ending time.

With the approach that I am pointing to, you may be able to solve clapping issues commented in your PS as well.

I recently solved a challenge in the Forum about forecasting periods based in a weekly granularity, and another one to extract differentials from retail on a monthly basis schedule. In both of them I had to work in with the reporting granularity as input.

You can have a look to this two workflows aiming for insights:

BR