You can use the following Dax formula to achieve your goal:
Measure =
CALCULATE(
DISTINCTCOUNT( Salesman[SalesmanKey] ),
CROSSFILTER( Sales[salesman_id], Salesman[SalesmanKey], Both ),
Sales[LocationId] = 6
)
However I recomend you using the salesman id from the fact table:
Measure =
CALCULATE(
DISTINCTCOUNT( Sales[salesman_id] ),
Sales[LocationId] = 6
)
Edit: i added the option using the calculatetable:
Measure =
CALCULATE(
DISTINCTCOUNT( Salesman[SalesmnaKey] ),
CALCULATETABLE(
Sales,
Sales[LotacionId] = 6
)
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…