Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
These measures are the best I can do with the limited amount of info that you've given.
// If you select year-months from the two
// tables, you should never use the YearMonth
// field from 'Date' in the UI. This column
// should be hidden.
[Measure] =
var YearMonthStart =
SELECTEDVALUE( StartDate[StartYearMonth]
var YearMonthEnd =
SELECTEDVALUE( EndDate[EndYearMonth]
var Result =
CALCULATE(
[Measure1],
KEEPFILTERS(
'Date'[YearMonth] >= YearMonthStart ),
KEEPFILTERS(
'Date'[YearMonth] <= YearMonthEnd )
)
RETURN
Result
[Cumulative Registration] =
var MaxVisibleDate = MAX('Date'[Date] )
var Result =
CALCULATE(
CALCULATE(
DISTINCTCOUNT( User[UserID] ),
KEEPFILTERS(
'Date'[YearMonth] >= YearMonthStart ),
KEEPFILTERS(
'Date'[YearMonth] <= YearMonthEnd ),
KEEPFILTERS(
'Date'[Date] <= MaxVisibleDate )
),
ALLSELECTED( 'Date' )
)
RETURN
Result