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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.