Forum Discussion

rtreble's avatar
rtreble
Frequent Visitor
8 years ago

Counting measures

Hi

 

We are looking at flagging whether the average time taken for a machine to do it's thing on a particular day is either above or below control limits (which are mean +/- 3 standard deviations for that machine - based on a rolling 3 month period).

 

We have successfully created a "flag" which is a measure that returns 1 if the daily average is above or below the control limits, or 0 when within control limits.

 

 

What we would like to do is count how many times the machine was "out of bounds" within say a month, by counting this measure within a month aggregation.

 

Any help much appreciated.

3 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    HI rtreble

     

    Something along these lines should work

     

    Measure = COUNTROWS( FILTER  ( <yourtable> , [Flag_Binary] = 1 ) )
    • rtreble's avatar
      rtreble
      Frequent Visitor

      Hi Phil

       

      Thanks for your post ... having trouble getting it to work though ... does your solution apply to counting rows in a table - what I'm after is counting results of a measure.

       

      R.

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        What I suggested was a measure that counts rows in a table.  

         

        Do you have a screenshot of your table?  Or can you post a sample version of your data