2 Replies Latest reply on Jan 30, 2015 5:00 AM by adrienne.fulkerson

    Display a weekly count based on a calculation that uses 30 second moving average


      Hello, I'm having some issues with using a moving average in a calculation.


      I have per second data. My calculation takes the difference between the measurement for each second compared to the average of the previous 30 seconds. If the difference is greater than x then the measurement is counted. (It returns a 0 or 1 for each second, 1's are counted)


      I want to display a weekly count. So, if there were 10 instances where the measurement should be counted, I only want a 10 in the table for that week.


      The only way I know to keep the moving average using second intervals is to drag the time dimension (set to seconds) to Details and compute the calculated field using that time dimension. I then have another instance of the time dimension in the column shelf set to weeks. I can display the total count for the week, but the number repeats in the cell (I believe because the calculated field is set to compute using seconds). If I remove the time dimension from Details and compute the field using the time dimension I use in the column shelf, the moving average tries to use the previous 30 weeks instead of seconds.


      Any ideas? Thanks in advance.