Solved

How can you sum up group property values?

  • 17 March 2024
  • 6 replies
  • 82 views

Badge

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

icon

Best answer by Saish Redkar 25 March 2024, 18:01

View original

6 replies

Userlevel 7
Badge +10

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.

Badge

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.

Userlevel 7
Badge +10

@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.

Badge

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.

Badge

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

Userlevel 3
Badge +2

@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). 

Reply