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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everyone,
I would like to calculate the total number of users as at end month from date slicer, selected YEAR = 2021 and MONTH = February, include all the USERID who registered before the end of February 2021.
Sample table:
Expected outcome in table:
Thanks.
Solved! Go to Solution.
// You must have a Date table
// in your model that will not
// be connected to Registered Date.
// Then, if you select any period
// of time from it, the measure below
// will return the number of UserIDs
// it the current context that have
// their Registered Date before the
// last visible date. If you select
// a period like a full month, it'll
// be exactly what you want but the
// measure is more general. T is the
// name of the table. Assuming that
// UserId is unique in T.
[# Users] =
var LastDateSelected = max( Dates[Date] )
var Result =
COUNTROWS(
filter(
T,
T[Registered Date] < LastDateSelected
)
)
return
Result
// or another version of the measure:
[# Users] =
var LastDateSelected = max( Dates[Date] )
var Result =
CALCULATE(
COUNTROWS( T ),
KEEPFILTERS(
T[Registered Date] < LastDateSelected
)
)
return
Result
// You must have a Date table
// in your model that will not
// be connected to Registered Date.
// Then, if you select any period
// of time from it, the measure below
// will return the number of UserIDs
// it the current context that have
// their Registered Date before the
// last visible date. If you select
// a period like a full month, it'll
// be exactly what you want but the
// measure is more general. T is the
// name of the table. Assuming that
// UserId is unique in T.
[# Users] =
var LastDateSelected = max( Dates[Date] )
var Result =
COUNTROWS(
filter(
T,
T[Registered Date] < LastDateSelected
)
)
return
Result
// or another version of the measure:
[# Users] =
var LastDateSelected = max( Dates[Date] )
var Result =
CALCULATE(
COUNTROWS( T ),
KEEPFILTERS(
T[Registered Date] < LastDateSelected
)
)
return
Result
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!