Skip to main content

I have two calculated fields: "Current Run Error Rate", which has a percentage or average value, and "7 Days Rolling Avg," field which I calculated using Window Avg (). However, when I attempt to compare the values of these two fields, I receive the error "Cannot Mix aggregate and non aggregate argument with function." See the screenshot below.

 

How should we solve this issue?

How to find out Difference of Avg Value and Window Avg Value

4 answers
  1. Nov 7, 2022, 5:54 PM

    The problem is that one of the fields is an aggregate and the other is not. In calculated fields, they need to both be either an aggregate or a non-aggregate. When using Current Run Error Rate on a view, do you aggregate it? If so, what aggregation do you use? You'll want to use that in the calculated field.

     

    But I'm not sure that field will aggregate properly. You may need to reconsider how it's written. I'm thinking something like:

     

    IF SUM([Current Run Total Outputs]) = 0 THEN 0

    ELSE SUM([Current Run Error Count])/SUM([Current Run Total Outputs]) END

0/9000