Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Calculated Column - Product Categories

Good evening All,   I am trying to create a calculated column that puts product codes into categories. A sample list of product codes are as per below.   The rules are as follows:   If the code...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    HI Anonymous

     

    Try this

     

    =
    IF (
        OR (
            SEARCH ( "L", TableName[Product Codes], 2, 0 ) > 0,
            SEARCH ( "E", TableName[Product Codes], 2, 0 ) > 0
        ),
        "LL",
        IF (
            OR (
                SEARCH ( "O", TableName[Product Codes], 2, 0 ) > 0,
                SEARCH ( "R", TableName[Product Codes], 2, 0 ) > 0
            ),
            "LO",
            "No Category"
        )
    )