# Sum of Averages in Spotfire

Hello experts,

I thought it would be very easy, but I've been struggling for days to make this simple query work. What I need is an expression that gives me the sum of averages.

(Due to filtering requirements I can't pivot my data table or use calculated columns, it has to be an expression).

Category |
Item |
Value |

cat1 | it1 | 10 |

cat1 | it2 | 20 |

cat2 | it1 | 30 |

cat2 | it2 | 40 |

cat2 | it2 | 50 |

Sum of Averages: |
55 |

So Avg(cat1) + Avg(cat2) = 55 is what I'm after, but no matter what I try I just can't make it work. Any help would be extremely appreciated!

## 1 Comment