2 Replies Latest reply on Mar 22, 2018 4:32 AM by Shiva Pillai

    Question relating to combining 4 columns (concatenate)

    Shiva Pillai

      Hello users,

       

      I would like to apologize for not sharing the workbook. IT restrictions, so I cannot upload any files. I have tried below in detail what I am trying to achieve and what issue I am facing:

      I am trying to Concatenate 4 columns: 'Division', 'Sub-Division', 'Product' and 'Sub-Product' in the Data Source. Here's what I did:

       

      - Right clicked on the 'Sub-Product' and then Create Calculated Field (so that the field is created immediately after 'Sub-product')

      - Renamed the Calculated Field as 'STRING_BusinessLine'

      - Used this calculation [Division] + [Sub-Division] + [Product] + [Sub-Product]

      - I get the desired results for wherever there is a value in each of the above column. So, if each of the above respectively contain A, B, C and D. I get ABCD in STRING_BusinessLine column

      - However, if there is a null in one of the columns, STRING_BusinessLine shows as null. So, if 'Sub-Division' is null STRING_BusinessLine column shows as null

      - How can I fix the calculated field such that it ignores the null? i.e. in the above example, STRING_BusinessLine should show as ACD (though there isn't a B in Sub-Division column)

       

      Sorry again for the lengthy post. I am a complete novice and this is my first post / question. Have been using tableau for only a couple of weeks now.