Sum Expression not summarizing Price as expected

I have a sum statement that doesn’t seem to be calculating as expected.

We have a quotes and commission table. There could be multiple records in the commission table for a single quote.

To sum the commission for each quote, I have a virtual field in the quotes table (vir_commission_act_pay) and display it on an email for the sales reps but it seems to be grabbing the last of the 2 records in this case vs. providing the Sum of the 2 records.

Records in Commissions table

Email Report field
3X_c_a_cace8b10e6bcac3ee4483db86a77f99fa7c0a706.png

0 3 147
3 REPLIES 3

Steve
Participant V

Have you used Test in Expression Assistant to test your expression?

3X_e_e_eee7cd45f96762ffcbbc2b481ff460c58e9d4c78.png

Yes, the value is 0

So it sounds like your expression doesn’t work as you want. You’ll need to break it down to see where it fails. If you remove SUM() from around SELECT(), does Test show the expression returning only one value?

Top Labels in this Space