# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Creator II

## Gauge graph

Good morning,

i would like to show a gauge with annual values.

I thought that if i select two years at the same time it would give a medium value...

But it's not exactly the exact amount...

Can somebody explain the value?

Thanks

1 Solution

Accepted Solutions
MVP

Hi, with sum(valore)/sum(tr)  it will do 60/9. To do an average by year you can use:

Avg(Aggr(sum(valore)/sum(tr),year)). So it calculates each year and then does the average of those results

3 Replies
MVP

Hi @Carlaf_93 can you post a capture of what you are doing? (the object and the expression used) The value the gauge shows depends on the expression it has to calculate, it will show a medium if the expression is set to calculate the medium, or it will sum year if the expression tells to sum values.

Creator II
Author

those are, for example, my data:

[table]:
year, valore,tr,
2018, 30,2,
2019, 20,3,
2020,10,4];

and in the gauge i have this expression:

sum(valore)/sum(tr)

i thoght that the value displayed when i select two years would be the avg... But it's not..

How can i have the exact value when i select the secific year and the avg of the selected ones when i select more?

MVP

Hi, with sum(valore)/sum(tr)  it will do 60/9. To do an average by year you can use:

Avg(Aggr(sum(valore)/sum(tr),year)). So it calculates each year and then does the average of those results

Tags
Community Browser