1 Reply Latest reply: Nov 7, 2018 11:45 AM by Mark Little RSS

    Analysis comparing absence and presence of a value

    Frederic Le Texier

      Hello,

       

      I would like to analyze data based on a field and compare the results when this field is equal or not to a value.


      For example, with the  table below.


      I would like to know the influence of the product P2 on the traetment efficiency.

       

      ClientTreatment EfficiencyProduct
      A90P1

      A

      90P2
      A90P3
      B80P1
      B80P3
      B80P4
      C84P3
      C84P4
      D86P2
      D86P4

       

       

      I want to know the average efficiency of the treatment with and without P2.

      The result I would have is :

       

      ProductAverage efficiency
      With P288
      Without P282

       

      What I need to do is to associate a variable "P2" with the customer, which will take the value "With" or "Without", according to whether he had or not this product.


      I would be able to do that without using Loading script, because the users should be able to reproduce for others products, and they are not trained to use scripts.

       

        • Re: Analysis comparing absence and presence of a value
          Mark Little

          HI,

           

          Set Analysis would be something like

           

          AVG({<Product={'P2'}>}[Treatment Efficiency])

          AVG({<Product-={'P2'}>}[Treatment Efficiency])


          So could create data selector either inline load or resident of Product called ProdSelector (Example)


          Then create variable

          vProd

          =GetFieldSelections(ProdSelector)


          Then use the set analysis below


          AVG({<Product={"$(vProd)"}>}[Treatment Efficiency])

          AVG({<Product-={"$(vProd)"}>}[Treatment Efficiency])


          Mark