1 Reply Latest reply on Oct 31, 2014 6:36 AM by Shawn Wallwork

    Calculated Field Creating More Entries than Exist

    Rebecca Sheeler


      I am trying to create a calculated field than has all entries where the "Lead_Time" is less than 0.

      I did this in two different ways, the first way was the following.

      First Way

      1. Right-clicked on the "Dimensions" list to pull up the menu that appears and clicked "Create Calculated Field..."
      2. Typed "Lead Less Than 0" in the "Name:" textbox in order to name the calculated field
      3. In the "Parameters:" column I clicked "Create..."
      4. Typed "Cal_LT_0" to name my parameter
      5. In "Allowable Values" I chose the "Range" radio button
      6. Clicked "Set from Field" and then "Lead_Time" from the list that appeared
      7. I left the lowest minimum value that was automatically generated but changed "Maximum" to -1
      8. Pressed "OK" and then double clicked on my newly created parameter "Cal_LT_0"
      9. Pressed "OK"
      10. Just to check to see what was generated, I put the newly created "Lead Less Than 0" dimension in the "Rows"
      11. It generated -5973 entries, the total amount of entries I have * -1

      Second Way

      1. I did the exact same then as step one in "First Way"
      2. Named it something different, lets just say "Test 2"
      3. I typed the following:
        IIF([Lead Time] < 0, [Lead Time], 0)
      4. I figured this was just a statement that tested to see if an entry's Lead_Time was less than 0 it would add it to the new "Test 2" calculation. If not, it would "0" or false meaning it wouldn't do anything with that entry
      5. This way generated -5,255 entries when it should've generated