# How to calculate Percentage of the Apdex "Frustrated" user's per Application?

**URL:** <https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833>\
**Category:** Real User Monitoring\
**Tags:** usql, user-sessions\
**Created:** [April 14, 2022, 1:13pm UTC](https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833 "2022-04-14T13:13:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmackey](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jmackey](https://community.dynatrace.com/u/jmackey)\
**Post date:** [April 14, 2022, 1:13pm UTC](https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833/1 "2022-04-14T13:13:47Z")

</div>

I am trying to create a visual chart using a Honeycomb to plot the percentage of Frustrated users per Application.&nbsp; The idea is to provide a visual for drill down.

I was using Data Explorer and dividing the Frustrated user’s by the overall total.&nbsp; Since I cannot use nested SQL, the below is not calculating properly and seems to mix the applications in the division. (I believe because of the sorting).&nbsp; Any ideas or other ways of doing this?

(builtin:apps.web.actionCount.category:filter(and(eq(“Apdex category”,FRUSTRATED))):splitBy(“dt.entity.application”):sum:auto:sort(value(sum,descending)):limit(100))

/

(builtin:apps.web.actionCount.category:splitBy(“dt.entity.application”):sum:auto:sort(value(sum,descending)):limit(100))

---

<div class="post-metadata">

**Author:** ![luislira](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/luislira/32/27841_2.png) [@luislira](https://community.dynatrace.com/u/luislira)\
**Post date:** [April 14, 2022, 1:37pm UTC](https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833/2 "2022-04-14T13:37:20Z")

</div>

Hi&nbsp;[@jmackey](https://community.dynatrace.com/user/2170)&nbsp;,

The metric you are using actually provides you the number of “frustrated”- rated user actions per application. You can calculate the rate using the metric expression that you have, for clarity purposes I’d advise to split it in 3 metrics, one for Frustrated user actions per application, another for Total user actions per application and finally another one for Frustrated user action rate per application. An example below:

 ![luislira_0-1649943350357.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/0/e0d4833baa06d5cd1c354798b00122e314db1ed7.png)

Hope this is useful for you!

---

<div class="post-metadata">

**Author:** ![jmackey](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jmackey](https://community.dynatrace.com/u/jmackey)\
**Post date:** [April 14, 2022, 2:24pm UTC](https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833/3 "2022-04-14T14:24:48Z")

</div>

Thank you Luislira that worked.&nbsp; I think the reason it did not work originally is I had the “Fold Transformation” set to Sum.

So I’ll push my luck with a follow up question.&nbsp; Is there a way to compare this to the average “Frustrated” metric for an Application?&nbsp; Then I go show an alert when it exceeds the normal for the application.

---

<div class="post-metadata">

**Author:** ![luislira](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/luislira/32/27841_2.png) [@luislira](https://community.dynatrace.com/u/luislira)\
**Post date:** [April 14, 2022, 3:12pm UTC](https://community.dynatrace.com/t/how-to-calculate-percentage-of-the-apdex-frustrated-users-per-application/34833/4 "2022-04-14T15:12:33Z")

</div>

Awesome it worked!

For the Average “Frustrated” metric by application, you can use this metric for example:

```markup
builtin:apps.web.apdex.userType.geoBig

```

and then split by Web Application. I would suggest for a quick and manual comparison to add it as a 4th row in the previous table with your own thresholds set like this:

 ![luislira_0-1649948849876.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/3f1db731461c188a17f9b481cab104ecfce0777c.png)

If you want to alert on the overall Apdex for an application you can set a Custom alert for this metric under **Settings \> Anomaly Detection \> Custom Events for Alerting** and create your alert based on a certain Apdex threshold.
