Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Weak relationship issue

Hi,

 

I have an issue regarding the relationship between two tables.

It's two direct query connections related 1:1 from SQL server. The tables are from two different databases, which I assume is the reason for the issue.

 

My goal is to pull data from one table to the other using the RELATED-function.

When trying I receive an error that the column doesn't exist or there is no relation in the current context.

 

I've tried with importing one of the tables but the issue still occurs. Hence my assumption of the different databases.

 

Any fixes on this issue?

Thanks!

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi all,

     

    I couldn't figure out a solution within Power BI, hence I decided to solve it directly in SQL.

    I just created a view in SQL by getting data from the two tables in different databases.

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      On the table "Varer" I use this DAX-function to create a calculated column:

      Kontrol = RELATED(Kontrolhyppighed[ControlFrequency])
      • lukiz84's avatar
        lukiz84
        Memorable Member

        And controlfrequeny is a column? Because in your screenshot it looks like it's a measure.

         

        What happens (just for testing) when you try: = RELATED(Kontrolhyppighed[item_no])

         

        does this work?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Yes, it's a column. Even with item_no the issue occurs.

     

    controlfrequency is just formated as a whole number, hence the Zigma icon next to it.

  • Hi lukiz84 Anonymous ,

    Just i tell my observation over here. Why because pleae check the those two table relationship or any other date related link is there means it will not be work.for like you may be conncet like sort number or else somthing.
    Please check proper other relationship also.

    Thanks.
    Gokul

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi all,

     

    I couldn't figure out a solution within Power BI, hence I decided to solve it directly in SQL.

    I just created a view in SQL by getting data from the two tables in different databases.