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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

UseRelationship() and CrossFilter() functions may not be used

Hi Community,

 

I have created measure in ProjectDocXref to get values from searchdescriptions based on search id column.

 

DOC Table 
Doc_NameDocLinkidProNumber 
Protectionwww.google.com98123456 
Thermalwww.gmail.com97135312 
     
Search Table  
IdNameSearchDesc  
98Bikessmall Bikes  
97Ground Control SytemControl the ground  
     
 Output    
DOC Table
Doc_NameDocLinkidProNumberSearchDesc
Protectionwww.google.com98123456small Bikes
Thermalwww.gmail.com97135312Control the ground

 

I have One-to-Many replationship and relationship is inactive and set Cross Filter Direction  is both. I have created a measure on Doc table by using below expression:

 

SearchDoc = CALCULATE(values(SEARCH[Name]),USERELATIONSHIP(DOC[ID],SEARCH[ID]))

 

Everything working fine but now i have created Dynamic Row level security and created a users table with user name and email id and shared the report to the corresponding email id's. 

 

When they open the report They are getting below error for the Doc Table visual.

 

Error:

The UseRelationship() and CrossFilter() functions may not be used when querying 'DOC' because it is constrained by row-level security defined on 'SEARCH' or related tables.

 

Thanks,

Paruchuri

6 REPLIES 6
Anonymous
Not applicable

@Anonymous 

 

@marcorusso  answered this question on a different forum back in 2015:

 

link to forum

 

Marco's answer:

The use of USERELATIONSHIP is not supported in security roles. 
Use ALL and FILTER manually, check the "virtual relationship" pattern here:

http://www.daxpatterns.com/handling-different-granularities/

http://www.daxpatterns.com/handling-different-granularities/

 

Hope this helps.

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Instead of creating an inactive relationship and using USERELATIONSHIP function, could you try using LOOKUPVALUE function(without creating the relationship) to create the measure to get the related search descriptions to see if it works in your scenario? Smiley Happy

SearchDoc = LOOKUPVALUE('Search'[SearchDesc],'Search'[Id],MAX(DOC[id]))

Regards

Anonymous
Not applicable

Hi v-ljerr-msft,

 

Thanks for your reply. I tried the given DAX expression but i'm getting only one value but i need all the matched records. Is there any DAX expression with out Max. 

 

Thanks,

Paruchuri

Hi @Anonymous,

 

Could you try using the formula below to create new column in the Doc table to see if it works in your scenario? Smiley Happy

SearchDoc = LOOKUPVALUE('Search'[SearchDesc],'Search'[Id],DOC[id])

 

Regards

Anonymous
Not applicable

I tried it but not worked....

Hi @Anonymous,

 

Could you share a sample pbix file(with just some mock data) which can reproduce the issue, so that I can further assist on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploadingSmiley Happy

 

Regards

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors