Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Join DirectQuery and Imported tables in DAX

I have a DirectQuery table (Weather) which is sourced from an Azure SQL server. I would like to join this with an Imported table (Buckles) from an Excel sheet sourced from SharePoint Online.

 

Both tables have a UID field that is made up of a concatenation between a SiteID and timestamp. The UID field is named differently for each table.

 

I have created a One-To-Many relationship between the two tables.

 

I have tried to create a new DAX table using a NATURALINNERJOIN on Weather and Buckles but I get this error:

 

"No common join columns detected. The join function 'NATURALINNERJOIN' requires at-least one common join column."

 

I am confident it is not a problem with the underlying data because I've created a new imported Excel table (Test) with a selection of the data from Weather and I'm able to successfully create the join on Test and Buckles.

 

Is the joining of DirectQuery and Imported tables supported? I feel like this may be a type casting issue, but as far as I can see, both UID fields are set as Text.

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      When you say the join is active, do you mean the relationship? I think that's already the case.

       

      Definitely no space in the names.

       

      I've reviewed the link but it doesn't really give any more details. I'm following the guidance by creating a relationship between the relevant fields and then using the NATURALINNERJOIN on a new DAX table

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

        Please mark sure the relationship has been created between Weather and Buckles table based on field UID first, then used the method as the link provided by amitchandak to create the new table as below:

        NewTable=
        VAR buckles_TreatAs =
            TREATAS ( Weather, Buckles[UID], Weather[field1], Weather[field2] )
        VAR Result =
            NATURALLEFTOUTERJOIN ( buckles_TreatAs, Buckles)
        RETURN
            Result

        Best Regards

        Rena