Forum Discussion

SaganBigRedDog's avatar
9 years ago
Solved

Remove same text within a column

I think I'm just having a hard time wording what I'm trying to do.  We have record types that all start with "Service Onboarding" but on my visualizations I think this is redundant so I would like to remove that verbage.  However, not all of the record types are the same.  So I basically need a formula that will remove just "Service Onboarding" from the record type name.

 

I know you can do this in excel, but I'm having trouble finding the same functionality in Power BI.

  • SaganBigRedDog,

     

    Two DAX expression which can acheive this requirement for you reference.
    Column = REPLACE(Table1[RecordType],1,19,"")

    Column 2 = MID(Table1[RecordType],20,LEN(Table1[RecordType])-19)

     

    Regards,

    Charlie Liao

     

3 Replies

  • v-caliao-msft's avatar
    v-caliao-msft
    Microsoft Employee

    SaganBigRedDog,

     

    Two DAX expression which can acheive this requirement for you reference.
    Column = REPLACE(Table1[RecordType],1,19,"")

    Column 2 = MID(Table1[RecordType],20,LEN(Table1[RecordType])-19)

     

    Regards,

    Charlie Liao

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Why can't you just use "Replace values"?  Meaning why doesn't this work?  It would seem simple enough you would think like Excel values.