5 Replies Latest reply: Jun 13, 2018 10:15 PM by Nick Jose RSS

    How to create IF statement to make field from another field.

    Nick Jose

      kush141087 its.anandrjs antoniotiman  loveisfail serj_shu

       

      Hi,

       

      I have the following data:

       

      SKU CodeCategory
      001AA
      002BB
      003CC
      004DD
      005EE
      006FF

       

      Now I want to create a field say "Channel" with values 'X4' and 'X6' like this:


      Load

      SKU Code,

      If(Wildmatch (Category,'AA', 'BB', 'CC','DD'),'X4',

      If(Wildmatch (Category,'AA', 'BB', 'CC','DD','EE','FF'),'X6')) as Channel


      But this is not working. It is giving correct value of X4 but in case of X6 it is only considering values which are not covered in X4 i.e EE & FF only.


      Please help.


      Note: I cannot take two loads as it will multiple my data which happens to be SKU wise volume which I have to later show in a straight table where Category and Channel both will be dimensions. Basically the need for channel is to show sub totals on the basis of X4 & X6.

       

      Thanks

      Nick