4 Replies Latest reply on Oct 31, 2016 8:33 AM by Brian Ramler

    YOY % Variance with Aggregate Values

    Brian Ramler

      I'm trying to put together a YOY comparison on Average price information. I'm able to accomplish this for a different field (Sales Crates) without any problem, but when I try the same formula with Avg. Price I am getting a message saying "Cannot mix aggregate and non-aggregate.. .. in IF expressions".

       

      Crates calculation (worked fine)

           Calc Field 1     IF [Year]=2015 then [Sales Crates] else 0 END

           Calc Field 2     IF [Year]=2016 then [Sales Crates] else 0 END

           Calc Field 3     (sum([YOY Crates 2016])-sum([YOY Crates 2015]))/sum([YOY Crates 2016])

       

      Thank you!