2 Replies Latest reply: Aug 10, 2016 7:57 AM by Nitesh Chavan RSS

    Set Analysis Restriction

    buck master

      How can i limit a sum in set analysis for totaling quarter end monthly counts even if the user

      picks multiple months from a filter box.

      example: User picks (Jan, Fed, Mar) and only march counts get summed.

        • Re: Set Analysis Restriction
          Stefan Wühl

          Maybe like

           

          Count({<MonthField *= {'Mar','Jun','Sep','Dec'}>} FieldToCount)

          • Re: Set Analysis Restriction
            Nitesh Chavan

            Data:

            Load * Inline

            [

                 Date, Value

                01-01-2016,100

                15-01-2016,10

                31-01-2016,10

                01-02-2016,20

                15-02-2016,34

                28-02-2016,45

                01-03-2016,78

                15-03-2016,90

                31-03-2016,200

            ];

             

            //Make a variable for maximum date in variable overview

             

            Let vMaxDate= Max(Date);

             

             

             

            Expression would be :

             

            IF(Num(Month(vMaxDate))%4=0,

            Sum({<Date={">=MonthStart($(vMaxDate))<=MonthEnd($(vMaxDate))"}>} Value)

            )