2 Replies Latest reply on Feb 24, 2016 5:40 PM by Oxana Jomiru

    Multiple conditions calculation containing nulls

    Oxana Jomiru

      Below is a screen shot of my data sample. Enclosed is the workbook. I need help with the "Association" calculation.

      When the object is the "dress", I would like the calculation to return option 1 with a different name (such as "Black set" for the "Black" option) when option 1 is available. When option 1 is null, I would like the calculation to return Option 2 (with a different name again). When Option 2 is null, I would like the calculation to return Option 3 (with a different name) and finally if Option 3 is null, I would like the calculation to return Option 4 (with a different name). I started the "Association" calculation.

      I can't figure out how to create conditions in calculations that would take nulls into account.

       

      Any suggestions are much appreciated!!

       

      printscreen.JPG

        • 1. Re: Multiple conditions calculation containing nulls
          ann.stolzman

          Are you trying to just remove the nulls from the visualization so that blank spaces appear instead?

           

          Try using this: IFNULL([Association],"")  Create one of those for each Assocation and Option and all the nulls are gone. 

          -A-

          • 2. Re: Multiple conditions calculation containing nulls
            Oxana Jomiru

            No, I am not trying to get rid of the nulls. This is how the final result should look like (see below). I need to create a calculation that would account for the nulls based on my conditions. Once the "Association" calculation is ready to go, I will remove the Option 1-4 from the view and will end up with the "Association" column only.

             

            I essentially want my calculation to grab one of the options that would be captured under "Association".

             

            Let's say for line 1:  if option 1 is null, if option 2 is null, if option 3 is null then take option 4 and place it under the "Association" Red SET.

            For Lines that have option 1 available, I want the calculations to grab option1, for lines that don't have option 1, but have option 2, grab option 2 (even if they have option 3 or/and 4). 

            For lines that have option 3 (and don't have option 1 and 2), i want the calculation to return option 3 (even if option 4 is available.)

             

            Does this make sense?

             

            Screen Shot 2016-02-24 at 5.23.34 PM.png