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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.