Hi GD team, i was wondering if there’s a way to ge...

# gd-beginnersm

Masha Akatieva

05/23/2023, 9:28 AMHi GD team, i was wondering if there’s a way to get a total by column?
I was trying to create a metric that will sum up all the apples in 2022 with attribute 1, but when i add it, the sum still goes down below all the attributes at the column level. any hints?
thanks much in advance!

Masha Akatieva

05/23/2023, 9:34 AMhere’s where i’m stuck atm

j

Julius Kos

05/23/2023, 9:53 AMHello Masha,
Could you please provide more information here as we are not familiar with your data well enough? What exactly represents “0” and “1" in this case and how does your current metric look like?
Do I understand correctly that you want SUM of all columns of Apples where value is “1”?

m

Masha Akatieva

05/23/2023, 10:05 AMsorry, 0 or 1 are just values of an attribute applied to the fact ‘apples’.
so basically i struggle with summing up fact values for 2022 as one number at the end of the row.
ideally i also want this sum to disregard date by month attribute but filter out 0/1 attribute only by value 1).
but total by row will already be helpful:)

Masha Akatieva

05/23/2023, 10:23 AMmy current metric (

`Apples 1 by year`

) looks like this
`SELECT SUM(*Apples*) BY ALL *Year (Date)* WHERE *Attribute* = *1*`

j

Julius Kos

05/23/2023, 12:19 PMUnfortunately, I don’t see a way how to go about this using columns as the metric will be visually always split by the attribute in the Insight layout. You could possibly achieve something similar while using rows, with the pre-built SUM function. However, you would need to filter out the particular attribute (“1” in your case). That way the SUM metric would appear in separated row.

Julius Kos

05/23/2023, 12:20 PMIf you plan to use this insight on a dashboard, another common approach would be to use separated insight to display only the Apple SUM for the particular attribute and visualise it on the same dashboard.

m

Masha Akatieva

05/23/2023, 1:54 PMgot it, thank you!