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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alderete-tomas
Frequent Visitor

Join paths are expected to form a tree

I have 5 tables: Calendar (C), Sales (S), Profit Center Attributes (PC), Employees (E), Attendance (A).
I have them joined as follows: 
1. C[Date] (1:m) E[First Day of Month]
2. C[Date] (1:m) A[Date]
3. C[Date] (1:m) S[Date]
4. PC[Center] (1:m) A[Center]
5. PC[Center] (1:m) E[Center]
6. PC[Center ( 1:m) S[Center]
7. A[Key] (m:m) E[Key]

Every DAX formula I have created in PBI desktop works, but, when I publish it online, and it is applied the RLS, people get to not see some graphs or cards which show a DAX formula. 
Attached is a capture from the error shown in PBI Service, which says: 
Join paths are expected to form a tree but the table "Attendance" has two join paths to table "Profit Center Attributes": "Attendance"->"Employees"->"Profit Center Attributes" and " Attendance" ->"Profit Center Attributes".

alderetetomas_1-1667935194105.png

When there is no RLS, everyone can see every DAX formula or graph, etc. But, when it is applied, this error occurs.
Just to mention, RLS is applied and joined between Userprincipalname and certain "Center"s from "Profit Center Attributes".
(For example: John can see "Center" A32, A45, B67 and Sophia can only see "Center" A45)
How can I solve this?

 

1 ACCEPTED SOLUTION
alderete-tomas
Frequent Visitor

It's been solved by keeping the relationship bewteen E and A inactive (but existing), then applied in the measure I needed "CROSSFILTER(PC[Center], Employees[Center], OneWay_LeftFiltersRight))".

 
Thanks for your time, indeed.

View solution in original post

3 REPLIES 3
alderete-tomas
Frequent Visitor

It's been solved by keeping the relationship bewteen E and A inactive (but existing), then applied in the measure I needed "CROSSFILTER(PC[Center], Employees[Center], OneWay_LeftFiltersRight))".

 
Thanks for your time, indeed.
v-yanjiang-msft
Community Support
Community Support

Hi @alderete-tomas ,

According to your description, I create a sample. As you can see, if you already create relationships C>A and C>E, we can't create active relationship between A and E any more.  As it will creates a closed-loop relationship, which is not allowed in Power BI.

vkalyjmsft_0-1667976311867.png

The error message said you have two paths from table "Attendance" to table "Profit Center Attributes", Power BI don't know which path to choose. I suggest you delete the relationship between A and E.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for yor time taking a look into this. 
Want to make a point: the relationship between E and A is because Employees contains personal info, DNI, working or dismissed, first day of month, etc., and this table changes from month to month; while Attendance is a daily personal information containing DNI, Date, states of attendance, etc. This relationship is inactive, but exists and to "active it", in a DAX line it's used "userelationship".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors