Forum Discussion

Velocity's avatar
Velocity
Icon for Helper III rankHelper III
6 years ago
Solved

Unable to create a column based on relationship with another table

Hi,

 

I have a table (Table_A) with multiple values of a field (Field_A). There is anothe table (Distinct_Table_B) with only one field (Field_B). There is a one to many relation built from Field_B to Field_A.

 

I want to create a calculated column in Table_A which says 'True' if it finds matching Field_B for Field_A. 

 

Help requested.

  • Velocity 

    New column in Table_A

    New Column = if(isblank(countx(filter(Distinct_Table_B,Distinct_Table_B[Field_B]= Table_A[Field_A] ),Distinct_Table_B[Field_B])),"No","Yes")

  • Hi,

    In Table_A, create this calculated column formula

    =IF(ISBLANK(RELATED(Distinct_Table_B[Field_B])),FALSE(),TRUE())

    Hope this helps.

7 Replies

  • Velocity 

    New column in Table_A

    New Column = if(isblank(countx(filter(Distinct_Table_B,Distinct_Table_B[Field_B]= Table_A[Field_A] ),Distinct_Table_B[Field_B])),"No","Yes")

    • Velocity's avatar
      Velocity
      Icon for Helper III rankHelper III

      Thanks amitchandak. However, i have not understood the role of countx in this expression. Can you please explain?

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        I am creating a calculating column to get data from unrelated tables using the choice of filters. So I just counted if it present in another table. It will return blank for no match. We can also use minx and maxx.

         

        ** unrelated  - the way we are using it as of now.

  • Hi,

    In Table_A, create this calculated column formula

    =IF(ISBLANK(RELATED(Distinct_Table_B[Field_B])),FALSE(),TRUE())

    Hope this helps.