Forum Discussion

Arman_And's avatar
Arman_And
Regular Visitor
3 years ago
Solved

Split column based on another column

Hi Everyone I want to split one column based on another column. In other words, I want to subtract the string of another column from the current column. I'm looking for a DAX or PQ formula to rea...
  • Samarth_18's avatar
    3 years ago

    Hi Arman_And ,

     

    You could try this:-

    Column = 
    VAR _found =
        FIND ( UPPER ( 'Table'[Subcategory] ), UPPER ( 'Table'[Name] ), 1, 0 )
    RETURN
        TRIM (
            REPLACE ( UPPER ( 'Table'[Name] ), _found, LEN ( 'Table'[Subcategory] ), "" )
        )

    Output;-