When charting a metric - for example, Apdex of User Actions, for a time period of 24 hours. Modifying the resolution of the charts generate different overall average value.

Can someone explain which one should be used? This is particularly important when creating executive reports that show the User Experience for the previous day.

See picture below. The top graph is using a resolution of 15 minutes and the bottom uses 1 day.

Comment

Best Answer

**Answer** by
**Stefan M.**
·
Oct 05, 2016 at 02:35 PM

By default, the average is calculated by summing up the average of each data point divided by the number of data points. Let's see following example, we have 5 data points (for each minute one since the resolution is one minute):

Now, if you configure a resolution of 5 minutes you only have one data point for the timeframe and you get a slightly different average (0.89 instead of 0.88):

To get resolution independent averages you have to do following: go to the *Dashlet Properties* of the chart -> Tab *Columns* and mark the following option:

Afterwards, you will see the same average for every resolution:

configuration-global-averages.png
(34.1 kB)

default-average-calculation.png
(40.1 kB)

five-minute-resoultion.png
(14.9 kB)

total-average-calculation.png
(32.7 kB)

**Answer** by
**Sreerag M.**
·
Jan 18, 2015 at 04:00 PM

Try adding the table for charts; also enable records (data points) for the table.

The overall avg of the chart is the avg of all data points in the chart. The number of data points will be different for different resolution.

This will not correct values but you may get to know how overall vales are calculated by dynatrace.

-Sreerag

**Answer** by
**Scott C.**
·
Jan 20, 2015 at 02:32 AM

Thanks for the reply Sreerag. I've attached another picture that gives the data points. I changed the resolution to the left graph to 6 hours.

I know .02 may not sound like a lot, but when you're comparing and trending Apdex scores, it can mean a lot. I'm just confused on which value is correct.

**Answer** by
**Rick B.**
·
Jan 20, 2015 at 04:22 AM

Hi,

Each individual data point includes its own weight. It sounds like this is something you care about to a high degree so what you are looking for is a chart set to the same resolution as the timeframe (24 hours for 24 hours). This will take the sum of the day and divide it by the count, giving you the average for the day. You may want to use something like the meter chart for this in this case.

When you chart at a higher resolution, the metric in the legend is averaging the data points shown, hence averaging averages. The true average for those 6 hour periods is indeed 0.81, 0.89, 0.89, and 0.86, and when you average them together you get 0.8625 (rounded to 0.86). Because the chart average does not take into account the weight of each of those data points, they each get equal weight and you get the average of 0.86 instead of the true average of 0.88 for the day.

If you were to chart multiple days and wanted the average per day, you would chart with the resolution of 1d.

Does this make sense?

Rick B

Thanks Rick, I should have pointed out the avg of avg in my reply. I thought i will guide Scott in that direction by taking him through the data points of the chart.

-Sreerag

**Answer** by
**Scott C.**
·
Jan 21, 2015 at 02:10 AM

Thanks Rick. Your response does make sense. Our report that we send daily has been using 1 hour granularity, but we're the report only shows the average for the day. I've updated the report to use 1 day granularity.

**Answer** by
**Paolo S.**
·
Sep 30, 2016 at 03:27 PM

Hi,

Thanks to @Rick B. for the explanation, we are experiencing the same problem.

Specifically we are using XML REST Reporting to integrate Dynatrace data in a third party application.

Starting from a Chart dashboard, the following is a sample result with timerange 1h and resolution 15m and 1h respectively:

<?xml version="1.0" encoding="utf-8"?> <dashboardreport name="SampleDsahboard" version="6.3.9.1009" reportdate="2016-09-27T12:01:36.808+02:00" description=""> <source name="B2B" filtersummary="from yesterday 11:00 to yesterday 12:00"></source> <data> <chartdashlet name="Chart" description="" showabsolutevalues="false"> <measures> <measure measure="SampleBT - User Action Response Time - 10251" color="#590d0d" aggregation="Average" avg="5.305436664453449" unit="s" min="4.47034794764365" max="6.859152754620808" sum="21.221746657813796" count="287"> <measurement timestamp="1474880400000" avg="4.875755328634511" min="2.378119140625" max="19.94070703125" sum="448.569490234375" count="92"></measurement> <measurement timestamp="1474881300000" avg="6.859152754620808" min="2.667698486328125" max="93.23100000000001" sum="562.4505258789062" count="82"></measurement> <measurement timestamp="1474882200000" avg="4.47034794764365" min="2.443389892578125" max="8.6557880859375" sum="277.1615727539062" count="62"></measurement> <measurement timestamp="1474883100000" avg="5.016490626914829" min="2.5309365234375" max="22.6711015625" sum="255.84102197265625" count="51"></measurement> </measure> </measures> </chartdashlet> </data> </dashboardreport>

<?xml version="1.0" encoding="utf-8"?> <dashboardreport name="SampleDsahboard" version="6.3.9.1009" reportdate="2016-09-27T12:01:36.808+02:00" description=""> <source name="B2B" filtersummary="from yesterday 11:00 to yesterday 12:00"></source> <data> <chartdashlet name="Chart" description="" showabsolutevalues="false"> <measures> <measure measure="SampleBT - User Action Response Time - 10251" color="#590d0d" aggregation="Average" avg="5.379869773519164" unit="s" min="5.379869773519164" max="5.379869773519164" sum="5.379869773519164" count="287"> <measurement timestamp="1474880400000" avg="5.379869773519164" min="2.378119140625" max="93.23100000000001" sum="1544.022625" count="287"></measurement> </measure> </measures> </chartdashlet> </data> </dashboardreport>

The avg attribute of the measure element is not the true average unless the timerange equals the resolution.

This leads to some drawbacks (if we refer to that attribute):

- if we need to retrieve data for different timeranges, we have to save more instances of the same Chart

- we can have true averages only for timeranges for whom there are matching resolutions

But what is most problematic is if we need to get for example the last 1 hour average. The following is a sample result with a timeframe filter tf:Last1h and resolution 1m and 1h respectively:

<?xml version="1.0" encoding="utf-8"?> <dashboardreport name="SampleDsahboard" version="6.3.9.1009" reportdate="2016-09-30T15:35:28.318+02:00" description=""> <source name="B2B" filtersummary="last hour"></source> <data> <chartdashlet name="Chart" description="" showabsolutevalues="false"> <measures> <measure measure="SampleBT - User Action Response Time - 10251" color="#590d0d" aggregation="Average" avg="4.67585076419891" unit="s" min="2.236" max="10.12446875" sum="196.38573209635422" count="69"> <measurement timestamp="1475238960000" avg="5.5600000000000005" min="5.5600000000000005" max="5.5600000000000005" sum="5.5600000000000005" count="1"></measurement> <measurement timestamp="1475239020000" avg="4.102458984375" min="3.994" max="4.174376953125" sum="12.307376953125" count="3"></measurement> <measurement timestamp="1475239140000" avg="3.9372832031250002" min="2.775" max="5.750849609375" sum="11.811849609375" count="3"></measurement> <measurement timestamp="1475239200000" avg="5.473" min="5.473" max="5.473" sum="5.473" count="1"></measurement> <measurement timestamp="1475239260000" avg="2.845" min="2.845" max="2.845" sum="2.845" count="1"></measurement> <measurement timestamp="1475239320000" avg="3.555392578125" min="3.479" max="3.631785400390625" sum="7.11078515625" count="2"></measurement> <measurement timestamp="1475239380000" avg="3.601238037109375" min="3.601238037109375" max="3.601238037109375" sum="3.601238037109375" count="1"></measurement> <measurement timestamp="1475239440000" avg="3.6755079752604165" min="2.4701083984375" max="4.66741552734375" sum="11.02652392578125" count="3"></measurement> <measurement timestamp="1475239500000" avg="4.3500000000000005" min="4.04" max="4.66" sum="8.700000000000001" count="2"></measurement> <measurement timestamp="1475239560000" avg="5.7905283203125" min="4.494056640625" max="7.087" sum="11.581056640625" count="2"></measurement> <measurement timestamp="1475239620000" avg="3.7070556640625" min="3.7070556640625" max="3.7070556640625" sum="3.7070556640625" count="1"></measurement> <measurement timestamp="1475239800000" avg="2.519" min="2.519" max="2.519" sum="2.519" count="1"></measurement> <measurement timestamp="1475239860000" avg="5.2700000000000005" min="4.135" max="6.405" sum="10.540000000000001" count="2"></measurement> <measurement timestamp="1475239920000" avg="4.1495" min="3.944" max="4.355" sum="8.299" count="2"></measurement> <measurement timestamp="1475239980000" avg="5.4445" min="3.731" max="7.158" sum="10.889" count="2"></measurement> <measurement timestamp="1475240220000" avg="4.773" min="4.773" max="4.773" sum="4.773" count="1"></measurement> <measurement timestamp="1475240340000" avg="4.12594482421875" min="4.12594482421875" max="4.12594482421875" sum="4.12594482421875" count="1"></measurement> <measurement timestamp="1475240400000" avg="8.928035644531251" min="4.6370000000000005" max="13.2190712890625" sum="17.856071289062502" count="2"></measurement> <measurement timestamp="1475240460000" avg="3.938844970703125" min="3.938844970703125" max="3.938844970703125" sum="3.938844970703125" count="1"></measurement> <measurement timestamp="1475240520000" avg="6.631787109375" min="6.631787109375" max="6.631787109375" sum="6.631787109375" count="1"></measurement> <measurement timestamp="1475240640000" avg="4.502" min="4.502" max="4.502" sum="4.502" count="1"></measurement> <measurement timestamp="1475240760000" avg="10.12446875" min="10.12446875" max="10.12446875" sum="10.12446875" count="1"></measurement> <measurement timestamp="1475240880000" avg="3.949287109375" min="3.7605166015625002" max="4.1380576171875" sum="7.89857421875" count="2"></measurement> <measurement timestamp="1475241000000" avg="4.36699609375" min="3.9111416015625" max="4.8228505859375" sum="8.7339921875" count="2"></measurement> <measurement timestamp="1475241060000" avg="7.8135" min="5.213" max="10.414" sum="15.627" count="2"></measurement> <measurement timestamp="1475241240000" avg="2.236" min="2.236" max="2.236" sum="2.236" count="1"></measurement> <measurement timestamp="1475241300000" avg="3.922647705078125" min="3.922647705078125" max="3.922647705078125" sum="3.922647705078125" count="1"></measurement> <measurement timestamp="1475241360000" avg="5.64484814453125" min="5.3930439453125" max="5.7747563476562505" sum="16.93454443359375" count="3"></measurement> <measurement timestamp="1475241420000" avg="6.6303168945312505" min="6.6303168945312505" max="6.6303168945312505" sum="6.6303168945312505" count="1"></measurement> <measurement timestamp="1475241480000" avg="4.1392685546875" min="4.1392685546875" max="4.1392685546875" sum="4.1392685546875" count="1"></measurement> <measurement timestamp="1475241540000" avg="6.9585" min="3.731" max="10.186" sum="13.917" count="2"></measurement> <measurement timestamp="1475241600000" avg="4.2754833984375" min="4.2754833984375" max="4.2754833984375" sum="4.2754833984375" count="1"></measurement> <measurement timestamp="1475241720000" avg="3.4530000000000003" min="2.541" max="4.365" sum="6.906000000000001" count="2"></measurement> <measurement timestamp="1475241780000" avg="2.965" min="2.965" max="2.965" sum="2.965" count="1"></measurement> <measurement timestamp="1475241840000" avg="3.7617089843750002" min="3.359" max="4.1644179687500005" sum="7.5234179687500005" count="2"></measurement> <measurement timestamp="1475241900000" avg="4.076626220703125" min="2.5816967773437502" max="4.90214453125" sum="16.3065048828125" count="4"></measurement> <measurement timestamp="1475241960000" avg="5.499181640625" min="5.140556640625" max="5.857806640625" sum="10.99836328125" count="2"></measurement> <measurement timestamp="1475242020000" avg="4.6272387695312505" min="3.9554775390625" max="5.299" sum="9.254477539062501" count="2"></measurement> <measurement timestamp="1475242200000" avg="3.972" min="3.972" max="3.972" sum="3.972" count="1"></measurement> <measurement timestamp="1475242260000" avg="4.4615" min="4.438" max="4.485" sum="8.923" count="2"></measurement> <measurement timestamp="1475242320000" avg="3.7600000000000002" min="3.7600000000000002" max="3.7600000000000002" sum="3.7600000000000002" count="1"></measurement> <measurement timestamp="1475242380000" avg="2.8680825195312503" min="2.8680825195312503" max="2.8680825195312503" sum="2.8680825195312503" count="1"></measurement> </measure> </measures> </chartdashlet> </data> </dashboardreport>

<?xml version="1.0" encoding="utf-8"?> <dashboardreport name="SampleDsahboard" version="6.3.9.1009" reportdate="2016-09-30T15:35:11.440+02:00" description=""> <source name="B2B" filtersummary="last hour"></source> <data> <chartdashlet name="Chart" description="" showabsolutevalues="false"> <measures> <measure measure="SampleBT - User Action Response Time - 10251" color="#590d0d" aggregation="Average" avg="5.021121118164063" unit="s" min="5.021121118164063" max="5.021121118164063" sum="5.021121118164063" count="40"> <measurement timestamp="1475240400000" avg="5.021121118164063" min="2.236" max="13.2190712890625" sum="200.8448447265625" count="40"></measurement> </measure> </measures> </chartdashlet> </data> </dashboardreport>

With 1h resolution, samples are considered only starting at 15:00 (count 40 instead of 69).

The only way to obtain the ture average is to set a fine grain resolution and to do outside Dynatrace the weighted average.

Is there anyone who found a different solution?

Paolo S.

Dynatrace Community Forums

February 2018

Announcing Dynatrace's Community Member of the Month for February 2018, **Gautier B.**! Click here to read more!

Learn the details in our latest blog post and join the EAP today!

Improve your operational efficiency and collaborate more effectively while addressing tightening security requirements. Have an early taste of what we have cooked up for 2018!

Learn more!

nginx
upgrade
java
diagnostics
dotnet
docker
6.5
ios
appmonsaas
database
sensor
performance warehouse
chart
hybris
integration
6.3+
service
metrics
production
web performance monitoring
transactionflow
test automation
incidents
measures
business transaction
migration
mq
php
community help
javascript
android
dashlet
server
monitoring
purelytics
nodejs
6.2
splunk
system profile
uem
appmon
reporting
framework
appmon 7
license
mobile monitoring
regex
collector
installation
adk
licensing
messagebroker
web services
apache
guardian appmon
xml
support
application detection
plugin
iis
dashboard
rest
webserver
reports
7.0
mainframe
client
6.1
configuration
continuous delivery
sensors
security
rest api
documentation
agent
web dashboard
alerting
load
window
dynatrace apm
6.3
forum help
administration
oneagent