Forum Discussion

jostnachs's avatar
jostnachs
Icon for Helper IV rankHelper IV
2 years ago
Solved

Concatenating columns from different tables

I have 3 tables. policy(fact table),agreement(dimension table) and structure(dimension table). now i would like to have a concatenated column in my agreement table with columns coming from policy table and structure table dependening on a condition that i have in agreement table. I am not sure how i can use concatenate/concatenatex/relatetable functions for this requirement.below is the relationship i have between these three tables.

 

Below is what I would like to acheive.

 

Regards,

Jostna 

 

 

  • Hi jostnachs - as per above relationships shared, 

    Policy table is related to the Agreement table so you can  bring the required column to agreeement table. using related 
    Agreement table is related to the Structure table.--> bring the strucutred colum nto agreement table.

     

    create a new column in agreement table as below:

    ConcatenatedColumn =
    VAR PolicyNumber = RELATED(Policy[PolicyNumber])
    VAR StructureName = RELATED(Structure[StructureName])
    VAR AgreementType = Agreement[AgreementType]

    RETURN
    IF(
    AgreementType = "Active", // your condition add it
    PolicyNumber & " |" & StructureName,
    BLANK()
    )

     

    Hope it works

8 Replies

  • Hi jostnachs - as per above relationships shared, 

    Policy table is related to the Agreement table so you can  bring the required column to agreeement table. using related 
    Agreement table is related to the Structure table.--> bring the strucutred colum nto agreement table.

     

    create a new column in agreement table as below:

    ConcatenatedColumn =
    VAR PolicyNumber = RELATED(Policy[PolicyNumber])
    VAR StructureName = RELATED(Structure[StructureName])
    VAR AgreementType = Agreement[AgreementType]

    RETURN
    IF(
    AgreementType = "Active", // your condition add it
    PolicyNumber & " |" & StructureName,
    BLANK()
    )

     

    Hope it works

    • jostnachs's avatar
      jostnachs
      Icon for Helper IV rankHelper IV

      Hi rajendraongole1 ,

       

      Thank you so much for the help!

      but i am having the following error.

       

      i have all the fields and relation as mentioned above

      • mostho's avatar
        mostho
        Icon for Helper II rankHelper II

        Maybe a typo eg. is there really a space between Local Department?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jostnachs 

    Is your problem solved, and if so, please mark the corresponding reply as a solution, which will help users with the same problem to better solve their problem.

     

     

     

     

     


    Best Regards,

    Jayleny