Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

The syntax for 'USERELATIONSHIP' is incorrect

I have created a new measure for Agreement that is giving  error message

 

This is the measure:

Agreement = LASTNONBLANKVALUE(Waterfall_Mnthly[Number], )
USERELATIONSHIP('SalesRevenue_Mnthly'[Waterfall_Link], Waterfall_Mnthly[Waterfall_Link]), NOT(ISBLANK('SalesRevenue_Mnthly'[Waterfall_Link])))
 
error message is 
The syntax for 'USERRELATIONSHIP' is incorrect
1 REPLY 1
HashamNiaz
Solution Sage
Solution Sage

Hi @Anonymous !

You should use following approach, create a measure with all the filters you need to apply, then create another measure in which you call first measure plus forcing the inactive relationship to play with UserRelationship()

See below for example;

 

Agreement = CALCULATE(LASTNONBLANKVALUE(Waterfall_Mnthly[Number]), NOT(ISBLANK('SalesRevenue_Mnthly'[Waterfall_Link])))

Agreement FR = CALCULATE ([Agreement], USERELATIONSHIP ('SalesRevenue_Mnthly'[Waterfall_Link], Waterfall_Mnthly[Waterfall_Link]))

 

You need to make sure you have inactive relationship in place between 2 tables.

 

Regards,

Hasham

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.