3 Replies Latest reply: Jan 11, 2016 12:46 PM by Gysbert Wassenaar RSS

    Set analytics inside IF statement does not reflect identifier.

    Pavel Krouglov

      I wanted my expression to show results only over two dimensions. Ones that are declared in the chart.

      Dimensions: val, Entity

      Expression:

      if(

        val=2

        ,Count({1<EnterDTM={'>=$(=Date(vToDate-29))'}>} DISTINCT Code)/30

        ,if(

        val=1

        ,Count({1<EnterDTM={'>=$(=Date(vToDate-2))'}>} DISTINCT Code)/3

        ,if(

        val=3

        ,Count({1} DISTINCT Code)/vNumberOfDays

        ,0

        )))

      However the result is reflecting all selections. What is wrong?