# USQL for Apdex score calculation

**URL:** <https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137>\
**Category:** Real User Monitoring\
**Tags:** apdex, usql\
**Created:** [April 15, 2024, 1:10pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137 "2024-04-15T13:10:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amita](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@amita](https://community.dynatrace.com/u/amita)\
**Post date:** [April 15, 2024, 1:10pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/1 "2024-04-15T13:10:07Z")

</div>

Hello,

I want an output of USQL like below,

![amita_0-1713186365064.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/097869163b5223d898f7ead3c95eaf42ea562a77.png)

apdex category is available with USQL(Satisfied,frustated,tolerating).Not able to get score using the same  
Can someone please help on this?

Regards

Amita

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [April 15, 2024, 1:28pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/2 "2024-04-15T13:28:09Z")

</div>

Hi&nbsp;[@amita](https://community.dynatrace.com/user/63691)&nbsp;  
You can view this list of applications with the corresponding Apdex score in the Data Explorer, not in USQL.  
Select the metric: “Apdex (by geolocation, user type)[web]”, split by “web application”.  
If you choose the “Table” view, you’ll get the table you’re looking for, which you can add to a dashboard.

---

<div class="post-metadata">

**Author:** ![amita](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@amita](https://community.dynatrace.com/u/amita)\
**Post date:** [April 15, 2024, 2:14pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/3 "2024-04-15T14:14:47Z")

</div>

Hello&nbsp;[@gbaudart](https://community.dynatrace.com/user/64996)&nbsp;,

I have tried this one earlier and it was giving me the expected result .

However I want to automate the process of getting apdex data at specific interval .

So was trying it over javascript calling usql in it. I have also tried calling an API but the results were not matching with dashboard one.

Thanks for quick response

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [April 15, 2024, 2:55pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/4 "2024-04-15T14:55:46Z")

</div>

This is not possible in USQL.  
However, you should be able to use the APIs to retrieve information from the following DataExplorer request: “builtin:apps.web.apdex.userType.geoBig:splitBy(“dt.entity.application”):sort(value(auto,descending))”

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [April 15, 2024, 2:56pm UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/5 "2024-04-15T14:56:06Z")

</div>

Alternatively, you could consider using workflows (or SRGs) to retrieve information every 15 minutes, for example.

---

<div class="post-metadata">

**Author:** ![amita](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@amita](https://community.dynatrace.com/u/amita)\
**Post date:** [April 16, 2024, 6:17am UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/6 "2024-04-16T06:17:55Z")

</div>

yes,once we are able to retrive ,use of SRG and workflow is in our plan.

Thanks for the suggestion 🙂

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [April 16, 2024, 7:42am UTC](https://community.dynatrace.com/t/usql-for-apdex-score-calculation/45137/7 "2024-04-16T07:42:36Z")

</div>

If you look at the information in USQL, you’ll see a difference to DataExplorer.  
DataExplorer’s metrics are real-time and cover all application actions.  
USQL only allows you to process information from user sessions that have **ended**. So if you look at a USQL from the last hour, for example, it’s unlikely to be representative. (And depending on how your application works, the current day’s display in the USQL may be heavily biased).  
Where possible, I always prefer to get information from the DataExplorer.
