Here's why:I have a database that lists out all my company's sales representatives. Because some products can take more than a month to ship and because Sales quotas change month-to-month, I have multiple rows for the same Product ID for different months' quotas. Now, I've corrected for this fact in all my Report expressions, by forcing a CountDistinct on the Fields!RXFILL_ID.Value parameter, but I'm encountering problems when I try to logic my way through this one:[code="plain"]SalesID RxFill_ID Price QuotaYear QuotaMonth16 123 200 2015 316 123 200 2015 416 123 200 2015 516 456 150 2015 316 456 150 2015 416 456 150 2015 5[/code]Now, ordinarily I could go back to the query and force it to group by the RxFill_ID, but! I will eventually need to be able to get the QuotaYear and QuotaMonth columns' data as well.How do I write an expression in the report that will, in the above example, give me the value 175 (i.e., the average of 200 & 150 for the two different orders)?
↧