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.
Hi,
I'm getting an error message the following error message "USERELATIONSHIP function can only be used in the CALCULATE" with the below measure I have written and I'm not sure where I have gone wrong, but I'm definately using CALCULATE and USERELATIONSHIP.
Leavers VOL = CALCULATE(COUNT(Person[PersonID]),
USERELATIONSHIP(Dates[Date], Person[TerminationDate])+0,
FILTER(Person,Person[TerminationReason] IN{"Resignation - VOL","Retirement - VOL"}))
Assistance is much appreciated
Solved! Go to Solution.
Hi @Anonymous
You may try it this way
Leavers VOL =
CALCULATE (
COUNT ( Person[PersonID] ),
USERELATIONSHIP ( Dates[Date], Person[TerminationDate] ),
FILTER (
Person,
Person[TerminationReason] IN { "Resignation - VOL", "Retirement - VOL" }
)
) + 0
Hi @Anonymous
You may try it this way
Leavers VOL =
CALCULATE (
COUNT ( Person[PersonID] ),
USERELATIONSHIP ( Dates[Date], Person[TerminationDate] ),
FILTER (
Person,
Person[TerminationReason] IN { "Resignation - VOL", "Retirement - VOL" }
)
) + 0