Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Join is made on two table but related function is throwing error

Hello Guys,

I have established the joined between two tables based on commin field. but while taking related funtion ,it is showing error.

Can anyone please help me on this.

 

Error snapshot.

 

Connection.

 

  • Hi Anonymous ,

    As the error message mentioned, the context in your expression is ambiguous so that you cannot use it directly.

    Note:

    • The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. 

    • The RELATED function needs a row context; therefore, it can only be used in calculated column expression, where the current row context is unambiguous, or as a nested function in an expression that uses a table scanning function.A table scanning function, such as SUMX, gets the value of the current row value and then scans another table for instances of that value.

     

    In this case, the relationship between two tables is many-to-many so you can create a bridge table to change it to many-to-one relationship. Please refer: Many-to-many to many-to-one 

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi Anonymous ,

    As the error message mentioned, the context in your expression is ambiguous so that you cannot use it directly.

    Note:

    • The RELATED function requires that a relationship exists between the current table and the table with related information. You specify the column that contains the data that you want, and the function follows an existing many-to-one relationship to fetch the value from the specified column in the related table. 

    • The RELATED function needs a row context; therefore, it can only be used in calculated column expression, where the current row context is unambiguous, or as a nested function in an expression that uses a table scanning function.A table scanning function, such as SUMX, gets the value of the current row value and then scans another table for instances of that value.

     

    In this case, the relationship between two tables is many-to-many so you can create a bridge table to change it to many-to-one relationship. Please refer: Many-to-many to many-to-one 

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.