Skip to main content
Question

Grouping and Aggregate Function in Generic Inquiry

  • December 19, 2025
  • 1 reply
  • 14 views

Forum|alt.badge.img

Hello all, I have a generic inquiry created that is supposed to calculate the quote to order conversion rate. The formula we are using is (Number of SO orders with QT type as an original order type) / (Number of QT order type in the system). 

This is the result: 

All three fields are calculated fields, using Sum() directly in the formula. Since I am using aggregate function, the GI requires a group by on Order Type. Else it would throw an error. 

The calculations are all correct by order type, but I don’t want it to be by order type. Using the screenshot above, I want the GI to only have one line, where 2 / 1123 = 0.001809

Any idea on how this can be accomplished? Thanks all! 

1 reply

npetrosov31
Freshman I
  • Freshman I
  • December 19, 2025

Hello, 

 

I have tried something on the Generic Inquiries and it looked working, you can try that and see if it helps you:

  1. I have added SOOrder table twice, one should represent QT type orders, second the created SO(or other type) orders:
    1. My Relations tab looks like this:
    2. In conditions I added order type for QTOrder table to always be QT. That way I separated QT orders from others in that table:

    3. I left grouping by order type from the QTOrder table. That just groups all the records in one:

    4. In results grid I made the needed calculations using Count function. Those can be changed to the ones you need. Just assume that counting SOOrder table returns the converted count, counting QTOrder table returns the QT orders count:

    5. And this is final result which I got: