Solved

Sum all table values in the row

  • 12 December 2023
  • 1 reply
  • 58 views

Hi all, I am trying to get the Budget Sum in my row, but until now withour success.

 

Essentially, based on the picture, I would like to see the SUM of the column Budget on each row.

 

I tried SELECT SUM(Budget) and SELECT RUNSUM(Budget) but I only receive the row value and not the total of all rows..

 

  • Any suggestion?

 

Thank you,

Andrea

icon

Best answer by Michael Ullock 12 December 2023, 02:16

View original

1 reply

Userlevel 2

Hi Andrea, 

if you would like to see the complete total of the SUM of the "Budget" on each row you can use the BY ALL OTHER function. This clause overrides all attributes—keeping the metric from being broken down at all. As a result, the associated metric will remain aggregated at the highest possible level of aggregation across all dimensions. More details on this can be found here:
https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/maql-analytical-query-language/maql-expression-reference/granularity-keywords/overriding-insight-attributes-with-by-keyword/by-all-in-all-other-dimensions/

Your metric would look something like this: 

SELECT SUM (Budget) BY ALL OTHER


 

Reply