18 Replies Latest reply: Feb 23, 2015 11:26 AM by Troy Proffitt RSS

    Need help with the Aggr function

      I am having an issue trying to get a formula I put in a textbox to match up to a sum of rows in a chart.  As you can see from the image below, my sum of rows is $13,705,160.52.

      Here is the formula I'm using:

       

      =if(Year= $(=Max(Year)) and num(Month)= $(=Max(Month)) and ActiveEmployeeYN = 1 ,[Annual Salary])

       

      In the green textbox above, I'm using the exact same formula but add sum and formatting:

       

      =num(sum(if(Year= $(=Max(Year)) and num(Month)= $(=Max(Month)) and ActiveEmployeeYN = 1 , [Annual Salary])),'$#,##0.##')

       

      Analytics.jpg

      Can someone please tell me what I'm doing wrong?  I believe I need to use the Aggr function, but anytime I use it, my value is 0.  Thanks for your help