I have a table of MRR data where there is only a subscription start date and end date (end date is blank if the sub is still active).
With that in mind, how can I calculate, via DAX, the proper MRR totals by month for a customer who, for example, was active from Jan - March, but whose record now indicates that they've cancelled. I want to include that customer's recurring subscription fee in Jan, Feb and March -- but not April-August. And all as a running total?
Sample Data:
Customer ID | Sub Start Date | End Date | Monthly Amount | Status |
---|---|---|---|---|
Customer A | 1/1/2021 | 3/1/2021 | $5 | Cancelled |
Customer B | 2/1/2021 | $5 | Active | |
Customer C | 3/1/2021 | $10 | Active | |
Customer D | 1/1/2021 | 8/1/2021 | $20 | Cancelled |
Customer E | 4/1/2021 | 6/1/2021 | $50 | Cancelled |
Customer F | 5/1/2021 | $5 | Active | |
Customer G | 2/1/2021 | 7/1/2021 | $10 | Cancelled |
So, in Feb, for example, the MRR total would be $30 (Customer A, B, D) and for April, it would be $95 (Customer B, C, D, E and G).
Once we get to August, for example, the total would be $40 (Customer B, C, D - Ds last month of activity, and Customer F).
Any idea of how to accomplish this either via new columns or DAX measures would be greatly, greatly appreciated - as for the life of me, I cannot find an example of this and I figure somebody else's MRR data is set up this way.