Forum Discussion
Active subscriptions and New active subscriptions Dax measures
Rohit17 , You can create a new measure
CALCULATE(
COUNTROWS(Subscriptions),
FILTER(
Subscriptions,
Subscriptions[SUBSCRIPTION_START_DATE] >= STARTOFMONTH(TODAY()) &&
Subscriptions[SUBSCRIPTION_START_DATE] < ENDOFMONTH(TODAY())
)
)
CALCULATE(
COUNTROWS(Subscriptions),
FILTER(
Subscriptions,
Subscriptions[CANCELATION_DATE] >= STARTOFMONTH(TODAY()) &&
Subscriptions[CANCELATION_DATE] < ENDOFMONTH(TODAY())
)
)
Hi bhanu_gautam ,
Thanks for checking this
But this is referring to current date. What about earlier month ?
for example I wanted to check new active subs in January and new unsubscribed subs .
This won't work right ? let me know if I am thninking right or wrong
- bhanu_gautam2 years ago
Super User
Right, first measure will remain as it is
update second one as
dax
TotalNewActiveSubscriptions =
CALCULATE(
COUNTROWS(Subscriptions),
FILTER(
Subscriptions,
Subscriptions[SUBSCRIPTION_START_DATE] >= STARTOFMONTH(DateTable[Date]) &&
Subscriptions[SUBSCRIPTION_START_DATE] < ENDOFMONTH(DateTable[Date])
)
)And 3rd one as
TotalNewUnsubscribedSubscriptions =
CALCULATE(
COUNTROWS(Subscriptions),
FILTER(
Subscriptions,
Subscriptions[CANCELATION_DATE] >= STARTOFMONTH(DateTable[Date]) &&
Subscriptions[CANCELATION_DATE] < ENDOFMONTH(DateTable[Date])
)
)And make sure you have date table
Ensure that your Subscriptions table is related to the DateTable on the appropriate date fields (e.g., SUBSCRIPTION_START_DATE and CANCELATION_DATE).