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 tab...
  • rajendraongole1's avatar
    2 years ago

    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