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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TePe
Helper IV
Helper IV

Outer Join in a Composite Model

Hi,

 

I have a very large table (import mode) and a very small table (direct query mode, just because it's changing very frequently). Effectively I need a "outer join" her, so a lookup in the small table if there's a related information enhancing the big table, in case there's nothing I'll take some default from the big table. So essentially

 

value = if(isblank(related(smalltable(lookup_field)),largetable(default_field),related(smalltable(lookup_field)))

 

This works fine if both tables are in import more. However if I use the small table in direct query mode I get an error that there's no relation between the two tables. Just changing the small table to import mode fixes the error but not my problem 😉

 

Any idea? Would that work at all in regards to performance?

 

Thanks,

 

 

Thomas

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@TePe ,

 

There're several limitations of data model regarding direct query mode. For example, the bidirectional cross filtering is not supported in direct query mode. In general, I would suggest you use other expressions instead of related function. For exmaple, use pattern like below:

value =
VAR Current_Id = largetable[Id]
RETURN
    IF (
        ISBLANK ( largetable[default_field] IN VALUES ( smalltable[lookup_field] ) ),
        largetable[default_field],
        CALCULATE (
            MAX ( smalltable[lookup_field] ),
            FILTER ( smalltable, smalltable[Id] = Current_Id )
        )
    )

 

Community Support Team _ Jimmy Tao

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

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@TePe ,

 

There're several limitations of data model regarding direct query mode. For example, the bidirectional cross filtering is not supported in direct query mode. In general, I would suggest you use other expressions instead of related function. For exmaple, use pattern like below:

value =
VAR Current_Id = largetable[Id]
RETURN
    IF (
        ISBLANK ( largetable[default_field] IN VALUES ( smalltable[lookup_field] ) ),
        largetable[default_field],
        CALCULATE (
            MAX ( smalltable[lookup_field] ),
            FILTER ( smalltable, smalltable[Id] = Current_Id )
        )
    )

 

Community Support Team _ Jimmy Tao

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

Hi,

I guess that will work but performance will be not very nice (we're talking about >150million records in the large table). We're currently checking other options to model this challenge...


Thanks,

 

 

Thomas

Greg_Deckler
Community Champion
Community Champion

Perhaps try LOOKUPVALUE instead?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.