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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
otets
Advocate I
Advocate I

RLS and CROSSFILTER Error. Table has two join paths to table

Hi,

I try to use the CROSS FILTER function to avoid bi-directional relationships, and it works fine without RLS.

But when I try to use the same measure with RLS then, I receive the following error: "Join paths are expected to form a tree, but the table 'Revenue' has two join paths to table 'Org': 'Revenue'->'Org' and 'Revenue'->'Org'->'Metric'->'Org'"

I can reproduce it on the simple model and data.

Untitled - Power BI Desktop_221206175748.png

Measure =

    CALCULATE(
        SUM(Revenue[Revenue]),
        Metric[TypeID] = 1,
        CROSSFILTER(Metric[ProjectID], Org[ProjectID], Both)
    )

 

RLS (static for now) filters the SBU table.

Metric and Revenue - fact tables.

I have to propagate the filter by metric type from the Metric table to calculate the revenue (that is why I try to use CROSSFILTER and try to avoid both relationship directions)

 

If I remove "Metric[TypeID] = 1" from measure then it is work.

 

Could you please explain this error and help to resolve it?

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @otets,

 

so something to do with how RLS is propagated from the "RLS"-table to the fact tables, I don't understand fully why it happens. 

But you have a couple of opportunities to rewrite it, like this:

 

Measure =
CALCULATE (
    SUM ( Revenue[Revenue] ),
    TREATAS (
        CALCULATETABLE ( VALUES ( Metric[ProjectID] ), Metric[TypeID] = 10 ),
        Org[ProjectID]
    )
)

 

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

 

Hi, @sturlaws 

Thanks for your comment.
It works fine with RLS but not without it. It is a bit confusing for me.

The result without RLS
1.png
The measure RevenueByMetricType_1 with TREATAS solution
The measure RevenueByMetricType I have written recently. Here is the code

RevenueByMetricType = 
    CALCULATE(
        SUM(Revenue[Revenue]),
        SUMMARIZE(
            CALCULATETABLE(Metric, KEEPFILTERS(Metric[TypeID] = 1)),
            Org[ProjectID]
        )
    )


When I view it with RLS, the result is
2.png

I still don't understand this mystery with RLS and CROSSFILTER.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.