# Unique Visitors HIGHER or equal to Total Visits

**URL:** <https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850>\
**Category:** Dashboarding\
**Tags:** dashboards\
**Created:** [September 29, 2023, 9:17am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850 "2023-09-29T09:17:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [September 29, 2023, 9:17am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/1 "2023-09-29T09:17:04Z")

</div>

Our user complains that when they use a custom lasts 9 hours. The unique visitors are higher than the total visitors.

From the time dropdown, we test with various timelines and is not just the customs having issues.

Our Enterprise Web Dashboard shows the following  
Last 2 hours (The issue will sometimes occur)  
Total Visits 310 Unique Visitors 326  
**Yesterday (The issue will always occur - Unique \> Total)**  
Total Visits 3315 Unique Visitors 3346  
**Last 72 hours (The issue will always occur - Unique \> Total)**  
Total Visits 10083 Unique Visitors 10542

Is anyone also facing this issue?&nbsp;Can someone confirm the DEFAULT query for Total Visits and Unique Visitors?

I doubt we modified the query before. Even if we do the same query now wouldn’t have caused this strange behavior.

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [September 29, 2023, 6:00pm UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/2 "2023-09-29T18:00:22Z")

</div>

Can you tell us where are you seeing this data? If it is in a Dashboard, you can click on the tile and see the details, where you can see the query for it.

 ![Captura de tela 2023-09-29 145948.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/4/d4ec31e73a3e9b9bfeb6a9cfb81da60d5adb9171.png)

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [September 29, 2023, 6:30pm UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/3 "2023-09-29T18:30:38Z")

</div>

If you can provide a screen capture that would be best. Users commonly confuse Unique users and Session Count which then raise questions like this.

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [October 2, 2023, 1:29am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/4 "2023-10-02T01:29:54Z")

</div>

Enterprise Web Dashboard

Total Visits

SELECT count(\*) AS “Total Visits” FROM usersession  
WHERE userType = “REAL\_USER” AND applicationType = “WEB\_APPLICATION”

Unique Visitors

SELECT count(DISTINCT internalUserId) AS “Unique Visitors” FROM usersession  
WHERE userType = “REAL\_USER” AND applicationType = “WEB\_APPLICATION”

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [October 2, 2023, 11:29am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/5 "2023-10-02T11:29:50Z")

</div>

I dont see any issues with the query you are using. I know there can be issues with live sessions vs completed sessions when using the USQL vs nonUSQL as USQL wont look at live sessions, but that isn’t the case here.

I’ve tested it in our environment and its working as expected. What cluster version are you on?

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [October 3, 2023, 1:29am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/6 "2023-10-03T01:29:17Z")

</div>

We are on Dynatrace Managed version. 1.272.139I just went in to the dashboard to confirm the query were correct.The issue still happen but intermittence. This time round it occurs for last 7 days.U just need to play around with all the pre-set last xx hours/days to reproduce the issue.How can I tell if the query are USQL or nonUSQL? Are those the default query?One thing I notice in the view details. Not sure if it matters and if they are the default.Total Visits. Compare with previous timeframe - DISABLEDUnique Vistors. Compare with previous timeframe - ENABLEDDynamic time-frame shift - CHECKEDKindly advice

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [October 3, 2023, 5:42pm UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/7 "2023-10-03T17:42:48Z")

</div>

I cant get the issue to reproduce, but my cluster version is&nbsp;1.276.181.20231002-204711 - is it possible to upgrade your cluster and see if the issue is still present?

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [October 4, 2023, 1:09am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/8 "2023-10-04T01:09:42Z")

</div>

Dynatrace Managed current latest version release is 1.274.

I assume the release for 1.276 would be in a few days time.

FYI. This issue was reported few months back when our users discover it.

There were trying to use custom time like past 9 hours.

At that time we were on Dynatrace Managed version 1.268.

Anyway, would keep this thread active and see if others faces the same issue.

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [October 17, 2023, 9:52am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/9 "2023-10-17T09:52:28Z")

</div>

We perform upgrade but the issue still remain.

Is there way to reset or re-create this default dashboard - "&nbsp;Enterprise Web Dashboard"?

We have two other account/license and we confirm everything is the same (default)

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [October 19, 2023, 3:06am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/10 "2023-10-19T03:06:24Z")

</div>

Seeing is believing. Heres the screenshot. Please advice

 ![uniqueVisitors more than totalVisitors.PNG](https://global.discourse-cdn.com/dynatrace/original/2X/4/4a862ac61f280ad4f8257a849710f51836586e5d.png)

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [November 20, 2023, 4:12am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/11 "2023-11-20T04:12:28Z")

</div>

We are still facing this issue. Intermittently in a way. Any further advice?

From what we observed.&nbsp;Specifically, if you are zooming into less than 24 hours of data.

Be it if you are using the default presets of last xx hours or custom datetime set.

---

<div class="post-metadata">

**Author:** ![Suryanto\_1](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@Suryanto\_1](https://community.dynatrace.com/u/Suryanto_1)\
**Post date:** [December 13, 2023, 3:08am UTC](https://community.dynatrace.com/t/unique-visitors-higher-or-equal-to-total-visits/41850/12 "2023-12-13T03:08:15Z")

</div>

Results returned by the COUNT(DISTINCT \<field\>) function are approximate to prevent high memory usage. If COUNT(DISTINCT \<field\>) is used on a high-cardinality field, results might be even more rough.

High-cardinality fields are those fields that have only few duplicates. There is no suggestion to use this or not use count(distinct \<field\>) but just the result is an approximate value, not an actual value.

> **[Custom queries, segmentation, and aggregation of session data in RUM Classic](https://docs.dynatrace.com/docs/observe/digital-experience/rum-classic/session-segmentation/custom-queries-segmentation-and-aggregation-of-session-data)**
>
> Learn how you can access and query user session data based on keywords, syntax, functions, and more.

This is due to a limitation from ElasticSeach as shown here which is still the same in their current latest 8.11 release

[Cardinality aggregation | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/search-aggregations-metrics-cardinality-aggregation.html#_counts_are_approximate).  
[Cardinality aggregation | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/search-aggregations-metrics-cardinality-aggregation.html#_counts_are_approximate).
