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
Qlimax
New Member

Multiple active relationships between 2 Tables

Dear Community,

 

actually I am struggeling with our database and some special scenarios I want to measure:

 

Scenario: I have at least these 2 tables, named document and user.

A document has the columns checked_by, date_checked_by and marked_for_review by, which are in a many to one (*:1) relationship to the users. So in a nutshell, a document has 3 columns which can be edited by different users.ModellModell

 

Problem:

I want to count the number of documents a user edits, separated in checked_by, date_checked_by and marked_for review by in a table, let's say for a day or a special period. This works fine for the amount of checked_by, because here we have an active relationship. But the numbers of the other two columns are wrong, it seems like there is something like a XOR changing the results.

 

results.png

 

What have I tried until now:

- Copying the user table to a user2 table, which works but is really nasty IMHO and leads to a overhead in several queries, visualisations etc. 

 

 

What am I doing wrong? What am I overlooking?

 

 

Thank you for your help in advance!

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Qlimax 

 

You can use USERELATIONSHIP, please see the documentation below.

https://docs.microsoft.com/en-us/dax/userelationship-function-dax

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Refer this how can you use userelation to change join

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Mariusz
Community Champion
Community Champion

Hi @Qlimax 

 

You can use USERELATIONSHIP, please see the documentation below.

https://docs.microsoft.com/en-us/dax/userelationship-function-dax

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

 

Thank you so much!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors