BAQ advanced group by, sales rep & order totals

I am attempting to create a BAQ that displays all sales orders from this week and their totals sorted by sales rep. I am using the advanced group by editor, but I am getting an error saying the OrderHead.OrderNum needs to be part of the group by clause. Even if I add that field to the group by the next field in the query says it needs to be displayed. What would the right setup be in the group by editor to display a total for each sales rep, and a sum total of all reps?

I think you just need to remove the display columns that don’t pertain to how/what you’re grouping for it to work this way. So your OrderHed.SalesRepList and Calculated_TotalCharges (which I would guess is SUM(OrderHed_TotalCharges)) would be the only display fields.

If you still need to see all that additional info in addition to the summaries, you’ll have to do something different. I think the easiest way to do that would be to remove your calculated field and grouping from the query, and do the grouping/summing via the grid view on the analyze tab (or a dashboard).

Another option to have summaries alongside your other data is to remove the grouping/calculated field, and create new calculated fields that uses OVER and PARTITION BY, like this: SUM(OrderHed.TotalCharges) OVER(PARTITION BY OrderHed.SalesRepList)