Skip to main content

I want to calculate the month count starting from the first revenue month for each tenant. I am trying this formula:

MONTHDIF(Tenant.cohort_invoice_M.'Start Date', Month.'Start Date')

But I am getting an error

Function MONTHDIF arguments have incompatible Dimensions: Dimensions of argument 1 must be a subset or superset of Dimensions of argument 2

 

How to fix this?

Tenant.cohort_invoice_M has type dimension Month.

Hi, 

This error indicates that Pigment can’t compare both dates because they’re not specified by Tenant.

Month.'Start Date' doesn’t tell Pigment which month’s start date to take to compare with.

 

I made a little reproduction in case it can help you:

 

It works in my example because each Tenant has two dates attached, a Created date, and an 1st invoice date.

 

Let me know if you have further questions.

 

Best,


@Benoit thanks for your reply.

 

I wanted to build a matrix, where I have tenants as rows and months as columns. Cells would contain number of months since the tenant registration. Your suggested formula will give one MONTHDIF per tenant, but I also need a dimension of Month in the response.

Or you can recommend another method for building a cohort analysis for MRR? I will aggregate tenants by month cohorts, but in columns I need to have dimension ‘Month delta’, which contains values M 0, M 1, M -5, M 9 showing deltas between the inception month of a tenant and the reported month.

I wanted to use MONTHDIF to get the matrix of tenant/month values of diffs, then convert it to ‘Month delta’ dimension using ‘ITEM’ and then use the result to map MRR report from Month to Month Delta.

Do you have a better idea perhaps?


Reply