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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Rift
New Member

Userelationship doen't works many to many

Hi.

 

I'm trying to do a Userelationship with many to many imactive rrlation, but doesn't works. If I disable my main relation (1,*) and active my secondary and desirable relation (*,*) manually, the numbers works perfectly. But when I do it with the measure: measure = CALCULATE( SUM(column A), USERELATIONSHIP( inactiveRelation-key-from-table-A, inactiveRelation-key-from-trable-B)), it doesn't works.

 

The result of measure doesn't change, like the main relation was active.

 

Is possible to do a USERELATIONSHIP with a many to many relation?

1 ACCEPTED SOLUTION
Rift
New Member

Hi

 

First of all, thanks you for your responses.

 

I solved my problem, disabling main relationship:

 

CALCULATE(CALCULATE( SUM(column A), USERELATIONSHIP( inactiveRelation-key-from-table-A, inactiveRelation-key-from-trable-B)), CROSSFILTER(currentActiveRelationship-key-from-table-A, currentActiveRelationship-key-from-table-B, NONE))

View solution in original post

4 REPLIES 4
Rift
New Member

Hi

 

First of all, thanks you for your responses.

 

I solved my problem, disabling main relationship:

 

CALCULATE(CALCULATE( SUM(column A), USERELATIONSHIP( inactiveRelation-key-from-table-A, inactiveRelation-key-from-trable-B)), CROSSFILTER(currentActiveRelationship-key-from-table-A, currentActiveRelationship-key-from-table-B, NONE))

@Rift 
Thank you so much for this answer. I too have an active 1-to-many and a deactivated many-to-many. I was expecting USERELATIONSHIP to work, but it did not. Your answer saved me. 

BeaBF
Super User
Super User

@Rift The best approach is to create a fact table, which is a table with the column you use to relate the two tables. This way you would have a one to many connection for each of the two tables.

Here is a very simple example, but if you want to share your data I can help you in modeling an effective scheme.

BeaBF_0-1646226270430.png

In this way you can combine in a single table the fields relating to the transactions both of the first table (for example amount) and of the second one (for example City).

 

BF

Daryl-Lynch-Bzy
Community Champion
Community Champion

Hi @Rift , It is recommended to avoid Many to Many relationships.  The USERELATIONSHIP function works best with One to One or One to Many relationship.  You could consider changing your Data Model avoid the current scenario.

 

However, there is an alternative approach using the TREATAS function.   Please consider the following for background on the relationships vs treatas - Relationships in Power BI and Tabular models - SQLBI

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors