7 Replies Latest reply: Aug 16, 2017 4:34 PM by Ben Petosa RSS

    "Set Analysis" in Load Script

    Ben Petosa

      Hello Everyone,

       

      I am basically trying to recreate set analysis in my load script. I have different types of "Goal_Types" that I need to base the output on.

      The set analysis that I use for visualizations is:

       

      sum({<Goal_Type={4}>} Goal)

      This gives me a value where goal type is 4.

       

      I need to get this into the load script so it only brings in rows where the goal is less than 30% of the actual. I got around this before by only loading in Goal_Type 4, and using this:

       

      WHERE event/Goal <.3

       

      Now I have to bring in 2 more Goal_Types (7 & 8), so I need to base the logic off of the different types. I need something like this:

       

      WHERE event/(sum({<Goal_Type={4}>} Goal))<.3

      OR ((sum({<Goal_Type={8}>} Goal)) - (sum({<Goal_Type={7}>} Goal))) > 0

      ;


      Thanks in advance for any help you can offer,

      Ben