Solved

Can we Sum or RunSUM based for columns in a table?

  • 8 December 2022
  • 6 replies
  • 124 views

I’m trying to replicate a report, and would rather not create a metric for the SUM of 4 metrics I created if there is a sum feature I can use for each column that is built in. Not sure if there is a way to SUM the columns like there is with SUMing the Rows as shown below:

 


Any help is always apprecaited!

icon

Best answer by Michael Ullock 8 December 2022, 20:54

View original

6 replies

Userlevel 2

Hello, 

thanks for reaching out.

Unfortunately, we do not support such functionality where you can SUM the columns values horizontally. We only support this functionality vertically, as in your screenshot. In this case, you will need to create a metric as you mentioned, where you will SUM the totals of the 4 metrics. 

Thank you Michael, 

In this instance, I’m using a COUNT function for those metrics, counting the numbers of tasks that are listed with that priority against a custom field for severity. 

I’ve tried a very simple syntax, SELECT SUM(Prio: Low + Prio: Medium + Prio: High + Prio: Critical) and receive NULL values. Any suggestion on how to make this populate?

Hello, 

thanks for reaching out.

Unfortunately, we do not support such functionality where you can SUM the columns values horizontally. We only support this functionality vertically, as in your screenshot. In this case, you will need to create a metric as you mentioned, where you will SUM the totals of the 4 metrics. 

Thank you Michael, 

In this instance, I’m using a COUNT function for those metrics, counting the numbers of tasks that are listed with that priority against a custom field for severity. 

I’ve tried a very simple syntax, SELECT SUM(Prio: Low + Prio: Medium + Prio: High + Prio: Critical) and receive NULL values. Any suggestion on how to make this populate?

Userlevel 2

In the metric you have created:
SELECT SUM(Prio: Low + Prio: Medium + Prio: High + Prio: Critical)

The "Prio: Low" and "Prio: Medium" etc need to be individual measures/metrics within the final SUM measure. 

With each separate measure you create, you can validate that it is populating data. 

If the above doesn't help, I would like to suggest that you try our free GoodData University courses: 
https://university.gooddata.com/maql-metrics
https://university.gooddata.com/getting-started-with-maql

In the metric you have created:
SELECT SUM(Prio: Low + Prio: Medium + Prio: High + Prio: Critical)

The "Prio: Low" and "Prio: Medium" etc need to be individual measures/metrics within the final SUM measure. 

With each separate measure you create, you can validate that it is populating data. 

If the above doesn't help, I would like to suggest that you try our free GoodData University courses: 
https://university.gooddata.com/maql-metrics
https://university.gooddata.com/getting-started-with-maql

Are you saying that I would require 4 more metrics to show the SUM of those original COUNT metrics that I created, and then I would have to SUM all of those metrics together in the final SUM metric?

i.e. SUM(prio: low), SUM(prio: medium), etc,
Final Metric: SUM(SUM Prio Low + SUM Prio Medium, etc.)?

Userlevel 3

Yes, that is correct. You will need to create 4 separate metrics and then use them as inner metrics to create the final metric. 

Reply