Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi Guys,
We have a aggregate table of subscribers grouped into their common start dates and end dates. We want to be able to have one measure that, irrespective of which date dimension being used in the chart it, could count the number of active subscriptions. Active meaning that their subscription had not ended before the start of the date range (their end date can be within the date range)
Below is what we are using at the moment - but I'm pretty sure when we use this Measure on anything other than [Date] it calculates incorrectly. I would like a measure that would do this even if [month]/[week]/[quarter] .etc is selected.
-----------------------------------------------------------------------------------------------------
Hi, @Alex1988
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Calendar(a calculated table):
Calendar = CALENDARAUTO()
There is no relationship between two tables. You may create a measure as below.
Subscriber Base =
var _minperiod = CALCULATE(MIN('Calendar'[Date]),ALLSELECTED('Calendar'))
var _maxperiod = CALCULATE(MAX('Calendar'[Date]),ALLSELECTED('Calendar'))
var tab =
ADDCOLUMNS(
'Table',
"Flag",
IF(
NOT(
OR(
[End Date]<_minperiod,
[Start Date]>_maxperiod
)
),
1,0
)
)
return
SUMX(
FILTER(
tab,
[Flag]=1
),
[SubscriberCount]
)
Finally you may use the 'Date' column from 'Calendar' table to filter the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.