Forum Discussion

k943's avatar
k943
Helper I
3 years ago
Solved

develop smart algorithm for customer service email response

I am trying to make 2 columns that determine whether each email transaction of a case is from customer to company or from company to customer. Here is a sample picture: for example case ID#1, ...
  • v-yanjiang-msft's avatar
    3 years ago

    Hi k943 ,

    Sorry for late back. According to your description, I moidfy the sample and the formula:

    From Customer to Company =
    IF (
        NOT ( CONTAINSSTRING ( 'Table'[From Address], "@phoenix.com" ) )
            && CONTAINSSTRING ( 'Table'[To Address([email protected])], "@phoenix.com" ),
        "Yes",
        "No"
    )
    
    From Company to Customer =
    IF (
        CONTAINSSTRING ( 'Table'[From Address], "@phoenix.com" )
            && NOT ( CONTAINSSTRING ( 'Table'[To Address([email protected])], "@phoenix.com" ) ),
        "Yes",
        "No"
    )
    

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.