Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Coalesce from two diffrent tables

Hi,

 

I am trying to create a calculated column to create COALESCE(SITEADDR.STADDRESS1,TRANSFIL.ADDR_VAT1) or If(Isblank(SITEADDR.STADDRESS1) ,TRANSFIL.ADDR_VAT1 , SITEADDR.STADDRESS1). but this is not working.

 

So I have tried to merging tables TRANSFIL and SITEADDR but is still not working because tranfil table is very big. 

 

this is the relationsgip between them.


 

How can I solve this?

 

regards

  • Hi Anonymous ,

     

    You could try this:-

     

    column =
    COALESCE ( SITEADDR[STADDRESS1], RELATED ( TRANSFIL[ADDR_VAT1] ) )

    or

    column =
    IF (
        SITEADDR[STADDRESS1] = BLANK (),
        RELATED ( TRANSFIL[ADDR_VAT1] ),
        SITEADDR[STADDRESS1]
    )
    

    Note:- I am considering you are creating a column in SITEADDR Table.

     

     

3 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi Anonymous ,

     

    You could try this:-

     

    column =
    COALESCE ( SITEADDR[STADDRESS1], RELATED ( TRANSFIL[ADDR_VAT1] ) )

    or

    column =
    IF (
        SITEADDR[STADDRESS1] = BLANK (),
        RELATED ( TRANSFIL[ADDR_VAT1] ),
        SITEADDR[STADDRESS1]
    )
    

    Note:- I am considering you are creating a column in SITEADDR Table.

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    help please

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi Anonymous ,

     

    Whether the advice given by Samarth_18  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


    Looking forward to your feedback.


    Best Regards,
    Henry