Save Sum of a field in all records in a variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tanea
    Junior Member
    • Sep 2025
    • 7

    #1

    Save Sum of a field in all records in a variable

    Hello there!

    I just want to sum up one field which is filled in every record. (using Advanced Pack)

    Example: I have an entity for my meetings. In this entity there is a field called "price". Every meeting has an own defined price in this field. Now I want to sum up all prices (like what did I earn with all those meetings) AND save this amount in a global field to calculate with at other points. My idea was to add a new field to my user account where I wanted to save the total amount. But how to sum up all "prices"?

    I only found one way to sum them all up: Using a matrix report with a sum column. Works fine! But is there any possibility to save that result in a variable? I want to calculate for statistics, for example calculate the average or sum up with some other variables.

    Hoping for additional ideas - thankful for every comment!
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1806

    #2
    I guess it could work with a relation between Meetings and your User and by formula entity\sum related: https://docs.espocrm.com/administrat...titysumrelated

    Comment


    • tanea
      tanea commented
      Editing a comment
      Oh godness, it worked! Thank you so much!!!
Working...