Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Data refresh issue when changing from import to direct query mode

I have a Power BI report where I originally connected to Databricks and imported data in import mode. Now, due to limitations with import mode, I'm switching to direct query mode. I unchecked import mode, selected direct query, and saved the report. The data started refreshing, but around 80% completion, I got an error saying it couldn’t refresh due to the `USERELATIONSHIP` function.

To troubleshoot, I removed the relationships and tried again, but I still received an error stating that `USERELATIONSHIP` only works when two columns are referenced. This function is important for my measures, so I don’t want to delete them. Even if I remove the measures temporarily to complete the data load, the error would likely appear again on the next refresh.

Could anyone suggest a solution to fix this without losing the existing measures in my report?

2 Replies

  • smokeyjoe03's avatar
    smokeyjoe03
    Frequent Visitor

    The 'USERELATIONSHIP' function can only be used if the relationship already exists in the model. My guess would be that you had an inactive relationship in the model that now isn't there since moving to Direct Query. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Does any DAX code use USERELATIONSHIP()? 

    Could you please provide more details (relationships, measures, tables and fields) and I will try to reproduce the problem. Thanks.

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum