Hello all - I’m new to Epicor and struggling to understand aggregates in BAQ’s. I have an updatable baq used in a dashboard that allows our project managers to fill in the completion of a project as a percentage. What I’m trying to do is get an overall completion average of all projects.
I summed up the updated field called “percentcomplete”, I’ve done a count of all projects called “count_projs”. What I need to do now is basically percentcomplete/count_projs to get the average. I can’t do this since both are aggregates and can’t be used in formulas from what I’m seeing. The information on subqueries is totally unhelpful - I can’t really find if this is my answer or how it would work with my updatable percentcomplete field. Any help is greatly appreciated!
This is all in the same updatable baq if that’s what you’re asking me.
Yes, that was what I was asking. I’m not sure if this would work, but I would try an OVER clause to get what you need.
I actually need to get the max of both the percent complete and project count and use those to get my overall average. My apologies, I left that part out of my original question. Trying to do a max of an aggregate gives me the “Windows functions cannot be used in the context of another windowed function or aggregate” error
@TinaK Since this is already updatable if you are comfortable with C# you can do the calculation post processing on getlist.
2 Likes