Custom Metrics

Yair
Level 2
Custom Metrics

I'd like to generate a metric that reflects the sum of two columns:

sum(column1) + sum(column2)

Is there an option to achieve this in a 'no-code' environment, without having to use Python?

I attempted to use groupby, but it necessitated creating a column with identical values just for the groupby operation, and then choosing the sum for both columns. This feels overly complicated for a relatively straightforward task.

I was unable to find a way to perform this operation in the Metrics tab without coding.

I appreciate your assistance. Thanks.


Operating system used: Linux

0 Kudos
5 Replies
Turribeach

In the Group By recipe Group section uncheck "Compute Count for Each Group". Then select the checkbox for column1 and column2 but do not set any predefined aggregations. Finally in the Custom Aggregations section add this custom aggregation: 

Sum("column1") + Sum("column2")

That should do it.

0 Kudos
Yair
Level 2
Author

Ok, but what is the gorup key to group by? I want the sum to be on all the table, not on group from the table

 

Thank you ๐Ÿ™‚ 

0 Kudos
Turribeach

If you don't group by anything then you get a single row back with the sum(). You need to decide at which level you want this sum to be. Otherwise it's not an aggregate sum() it's just column1 + column2. 

0 Kudos
Yair
Level 2
Author

I want to have Matric value of sum(column1) + sum(column2) and then add this Metric to dashboard.

I know I dont need groupby, but I didnt find why to get this calculation for Metric without it.. 

the "column1 + column2" will give me it pre row, but I need all the column sum + all other column sum 

 

 

Thank you

 

 

0 Kudos
Turribeach

Then remove the Group Key after creating the Group By recipe and you will have a single row result. This is only allowed to do once you add a custom aggregation.

0 Kudos