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.
I am using the below formula successfully for a calculated column that returns a unique count of names associated with each UID
Hi @husseyma - To make your calculated column respond to date slicers, you'll need to modify the formula so that it includes the date context.
DCount Name =
VAR ThisId = 'Transitions'[UID]
VAR SelectedDateRange = CALCULATETABLE(
VALUES('DateDim'[Date]),
ALLSELECTED('DateDim')
)
RETURN
CALCULATE(
DISTINCTCOUNTNOBLANK('Transitions'[Name]),
FILTER(
ALL('Transitions'),
'Transitions'[UID] = ThisId &&
'Transitions'[Date] IN SelectedDateRange
)
)
create a measure instead of a calculated column since measures are more dynamic
Rolling 12M DCount Name =
VAR EndDate = MAX('DateDim'[Date])
VAR StartDate = EDATE(EndDate, -12)
RETURN
CALCULATE(
DISTINCTCOUNTNOBLANK('Transitions'[Name]),
FILTER(
ALL('Transitions'),
'Transitions'[UID] = MAX('Transitions'[UID]) &&
'Transitions'[Date] >= StartDate &&
'Transitions'[Date] <= EndDate
)
)
Hope it works in your scenerio
Proud to be a Super User! | |
Thank you so much for your response, unfortunately the modified formula suggested still returns the same result as the original calculation, ie it ignores my date slicers and displays a count for the entire table. The Rolling 12M also does not appear to be returning relevant results...
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.