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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Kudoed Authors