6 Replies Latest reply: Nov 11, 2015 5:41 PM by radhika sriramoju RSS

    Count - Please Help

    radhika sriramoju

      Hi

       

      I have 2 expressions ,

       

      expression 1 : =only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} Value )

       

      expression 2 : =only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} BridgeValue )

       

      I need to count the number of records where result of expression 1 is less than result of expression 2 and put it in a text box

       

      here is the current expression I using but this gives me 0 , btw I have an 2 dimensions in the chart =if(left([Metric Type], 4) = 'TP90', [User Friendly Metric Name]) and Order , how do I explicitly mention these in the text box expressionn

       

      =sum((if(aggr(count(only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} Value ) <=
      only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} BridgeValue)),AllSLAViolations.Metric),1,0)))

       

      can some one please help ,its urgent

       

      Thanks

        • Re: Count - Please Help
          Stefan Wühl

          what is this:

          ,AllSLAViolations.Metric


          And why are you not using your chart dimensions in the aggr() function as dimensions (well, you can't use the calculated dimension as aggr() dimension, but you should be able to create a calculated field in the script to replace both the chart dimension as well as the aggr() dimenson.

            • Re: Count - Please Help
              radhika sriramoju

              Sorry it has to be User Friendly Metric Name,

               

               

              =sum((if(aggr(count(only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} Value ) <=
              only({<CLNDR_DT={'$(=vSelectedDate)'}, [User Friendly Metric Name]=, Date=, [Metric Type]=>} BridgeValue)),[User Friendly Metric Name_New]),Order,[User Friendly Metric Name_New]),1,0))

               

              How do I include dimensions in the above expression ?the above is not working can you please correct it