Forum Discussion

SameshSawant's avatar
SameshSawant
New Member
11 months ago
Solved

Unable to use relate and lookup function on two different data sets (direct query + import)

I have two different data sources 1. postgre sql (live connection using direct query) has todays data. 2. amazon redshift (updates once daily using import) has previous 90days data. A model of...
  • Shubham_rai955's avatar
    11 months ago

    You are getting errors because Power BI does not allow using RELATED() or LOOKUPVALUE() functions between tables that use different storage modes—one DirectQuery (PostgreSQL) and one Import (Redshift).​

    Why this happens

    • DirectQuery and Import tables cannot be mixed for DAX relationship functions.

    • Calculated columns and some DAX functions like RELATED() only work when both tables use the same storage mode.

    What you can do

    • Change both tables to use Import mode if possible.

    • Or, if you must use DirectQuery for PostgreSQL, you need to keep your analysis separate or use Power BI Composite models ("mixed mode") features, but you’ll be limited in what calculated columns and DAX you can use.

    • Alternatively, merge the tables outside Power BI (for example, in your ETL process or in a database view) so that both are in the same storage mode before bringing them into Power BI.

    Let your admin know if you need to switch storage modes, as this is the main limitation.