Skip to main content

We’re a SaaS company and we have a Group Property (Account) for number of todos added by all the users within the Group (Account), eg:

  • Account A Todos: 100
  • Account B Todos: 120
  • Account C Todos: 90

How can I create a chart displaying the total number of todos for all accounts, eg 210? IE a sum of the values.

Cheers, Andrew

Hi @roginator 

You can use the Property Sum metric or PROPSUM formula on your numerical property.

Here’s a demo chart - https://app.amplitude.com/analytics/demo/chart/new/4huo3t6i

Hope this helps.


Thanks Saish but that seems to be counting the total more than once. Probably due to the fact that it’s utilising events from multiple users over multiple days. I’m now in touch with customer support to try and figure things out.


@roginator 

PROPSUM will aggregate the value across all users during that time period. It might be tricky to make PROPSUM on unique account ids afaik. I’ll see if I can find some other way on this.
Keep me posted here on what support says.


They helped me create a chart using PROPMAX with this criteria:

But that just displays a distribution across Accounts as opposed to a sum. I’m waiting for them to get back to me with how I can create a sum.


Here’s the final response from support. Pretty disappointing:

Manabu Takeya (Amplitude)

Mar 26, 2024, 11:27 AM GMT+1

Hi Andrew,
 
I understand you want to create a chart that shows the sum of the group property resources_human_current_count for each account. I am afraid there's no straightforward solution for what you're looking for now. As a workaround, we can export the chart I shared and then calculate the sum in Excel. My apologies!
 
Having said that, we take customer feedback seriously. Please submit a feature request from the UI to our product team.
 
Amplitude UI > Help button > Click Contact us > Feature Request


@roginator if you want the full sum, can you just delete the final group by and use propsum(a)? 

 

You can also filter for the desired groups in separate events and use propsum(A)+propsum(B)+propsum(C). 


@roginator if you want the full sum, can you just delete the final group by and use propsum(a)? 

 

You can also filter for the desired groups in separate events and use propsum(A)+propsum(B)+propsum(C). 

 

@Anthony thanks but isn’t that going to sum up the number of todos from every time an event is triggered? Eg, if 2 people from Account A trigger events, the sum is going to be 200 todos even though Account A only has 100 todos (100 todos x 2 people triggering the event). What I need is the number of todos summed up at the Account level. And I can’t see a mechanism for achieving that in your exampel. Please let me know if I’m missing something.


Hello Everyone,
 
Jacenda from Support here. I hope you're having a great day!
 
@Anthony Yes, you're correct. If you'd like to calculate the total sum of a property across different events, you can use the PROPSUM function for each event and then simply add them together.
 
However, in @roginator's case, it seems the issue with PROPSUM is that it aggregates property counts from multiple users' events, leading to an inflated property sum result. Therefore, PROPMAX, which returns the maximum value of the property you are grouping by, is currently the best alternative for @roginator's use case.
 
To sum the PROPMAX values, we can follow @Anthony's suggestion of filtering for the desired groups in separate events but use the PROPMAX formula instead. Here's an example:
?name=image.png
 
Alternatively, you can export the original PROPMAX chart and manually sum the values, as suggested by my colleague Manabu.
 
For more information on using formula functions, you can refer to this help article.
 
I hope this explanation is helpful! Feel free to reach out if you have any further questions.
 
Warm Regards!
 
-Jacenda


Reply