Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to sum in chart only values that are greater than the average of this field.
for example:
Data
| ID | Country | Amount |
|---|---|---|
| 1 | France | 10 |
| 2 | France | 16 |
| 3 | France | 12 |
| 7 | Greece | 32 |
| 8 | Greece | 34 |
| 9 | Greece | 38 |
| 4 | Spain | 24 |
| 5 | Spain | 22 |
| 6 | Spain | 21 |
I use this function: sum(aggr(if(sum(Amount)>avg(TOTAL <Country> amount),sum(Amount)),Country,ID))
Chart:
| Country | Avg(Amount) | What I want to get | what I get |
| France | 12.666667 | 16 | 0 |
| Greece | 34.666667 | 38 | 0 |
| Spain | 22.333333 | 24 | 0 |
Any suggestions?
Thanks
Hi Amber, it should work... the Amount field in the avg is lowercase, is that a typo in the post? if not that can be the issue.
Hi Amber, it should work... the Amount field in the avg is lowercase, is that a typo in the post? if not that can be the issue.
It should work if you fix the typo.
HIC

Thanks!!! ![]()