I have two formulas that give me the same result. The result I am getting is the monthly total.
This formula correctly gives me only the ABC subscriptions added in the current month:
This formula is trying to get the cumulative total but it gives me the monthly total only.
ABCs Cumulative Started To Date =
CALCULATE (
[ABC Order Count All],
USERELATIONSHIP(‘Recurring Subscriptions’[Subscription Start Date],DateTable[Date]),
FILTER (
all(‘Recurring Subscriptions’[Subscription Start Date]),‘Recurring Subscriptions’[Subscription Start Date]<=max(DateTable[Date])
))
Note, I need to use USERELATIONSHIP because I have another calculation that needs to use the END DATE. Both of these work fine to count the users that started and ended in the month. The problem is when I try to get the cumulative, it only gives me the total for the month.
For Cumulative Totals instead of selecting “ALL” replace it with “ALLSELECTED” and also replace the ‘Recurring Subscriptions’[Subscription Start Date]) with the Dates Table. So your code should be like this overall -
ABCs Cumulative Started To Date =
CALCULATE ( [ABC Order Count All] ,
USERELATIONSHIP( ‘Recurring Subscriptions’[Subscription Start Date] , DateTable[Date]) ,
FILTER ( ALLSELECTED ( DateTable ) ,
DateTable[Date] <= MAX( DateTable[Date] ) ) )
Also for calculation of Current Month Total you could have also used DATESMTD which could be -
@Harsh Thank you. That helped me fix a few things in my calculations. The DATESMTD cleaned up some related calculations that weren’t working correctly also.