I had an existing search that would get invoice count and average items sold by rep for the current week. I have changed it to add count and average for same week last year, but the average is not working as I expected. The calculation is not correct. My criteria is set to grab all transactions with a date of this week OR a date of last year same week, and the average should work as => If {trandate} this year, average {custbody_total_bottles}. Same for transactions last year. Can anyone tell me how to count the invoices and average bottles in my formulas? Below is a screenshot of the results tab, the last two formulas are the problem.
[ATTACH=JSON]{"data-align":"none","data-size":"full","data-attachmentid":437095}[/ATTACH]