# Which metric hold the information regarding mobile current/live users count?

**URL:** <https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814>\
**Category:** Dashboarding\
**Tags:** data-explorer, mobile-monitoring, dashboards-classic\
**Created:** [April 13, 2022, 2:08pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814 "2022-04-13T14:08:40Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 13, 2022, 2:08pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/1 "2022-04-13T14:08:40Z")

</div>

Hi guys,

Customer ask to put the number of current users of a mobile app on the data explorer tile in order to give it some nice colors and size it to fit a NOC dashboard but we didn’t find anywhere a metric for that…

The information is shown in the Mobile infographic

 ![Yosi_Neuman_3-1649858503383.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/9/c968af0cb30315ca4b9d3e5b4bf9e177addebbc8.png)

And in Mobile tile

 ![Yosi_Neuman_2-1649858479023.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/2/42fbf028c1778909535d89a7c96481c8ac2aa1f2.png)

But we could not find this information in any metric. Can you guys help and explain where is this missing metric?

All the best and stay safe

Yos

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [April 21, 2022, 5:16pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/2 "2022-04-21T17:16:23Z")

</div>

Hi&nbsp;[@Yosi\_Neuman](https://community.dynatrace.com/user/6931)

you can define such a tile for a dashboard using USQL, for the user with e.g.:

```markup
select count(*) as "Users" from usersession

```

You can run that under User sessions \> User sessions query and once you are happy with the result on that page you will be able to pin the result to a dashboard.

 ![mark_bley_0-1650561357329.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/78f2a0545e11d387b8fcbc8bd8db45fea256fdb5.png)

Best,

Mark

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 21, 2022, 7:34pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/3 "2022-04-21T19:34:14Z")

</div>

[@mark\_bley](https://community.dynatrace.com/user/13072)&nbsp;this is not the desired value. The dashboard tile shows active users. The USQL will show results from finished sessions only. That’s a different value and it will never match.

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [April 21, 2022, 9:22pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/4 "2022-04-21T21:22:26Z")

</div>

That is correct, then maybe the metrics you are looking for could be&nbsp;builtin:apps.other.userCount.osAndVersion-std or&nbsp;builtin:apps.other.userCount.osAndGeo

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 21, 2022, 9:35pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/5 "2022-04-21T21:35:14Z")

</div>

Unfortunately, no values of those metrics do not match the value on the infographic and dashboard tile. I get 3x the value from the metric compared to the value on the infographic.

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [April 21, 2022, 9:58pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/6 "2022-04-21T21:58:01Z")

</div>

I get very close (off by 1) with following query

```markup
builtin:apps.other.userCount.osAndVersion-std:filter(and(in("dt.entity.device_application",entitySelector("type(mobile_application),entityName.equals(~"<APP_NAME>~")")))):splitBy():value:auto:sort(value(sum,descending)):limit(100)

```

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [April 22, 2022, 12:39am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/7 "2022-04-22T00:39:49Z")

</div>

There is no clear answer hear as Dynatrace does not actually expose the live sessions, it is ‘in memory’ only and the values you see on the application and user sessions screen under ‘live’ are not retrievable via usql or metrics.

There are 2 options,

**1.** &nbsp;As mentioned above, use usql

This is going to have to be delayed data (e.g what happened last hour) based on the completion of user sessions, so will never be entirely accurate for what you want, since it’s only going to give you closed sessions.

example queries below.

SELECT count(distinct UserId) as ‘Current Unique UserID’ FROM usersession  
Where useraction.application IN (“xxx”) and userId IS NOT NULL

SELECT count(distinct UserId) as ‘Sessions with Errors’ FROM usersession  
Where useraction.application IN (“xxx”) and userId IS NOT NULL and useraction.requestErrorCount \> 0

**2.** &nbsp;The better alternative is to use the inbuilt calculated metrics

builtin:apps.web.activeUsersEst

builtin:apps.web.activeSessions

builtin:apps.other.userCount.osAndVersion-std

 ![Peter_Ralston_1-1650587807767.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/2/621b9e4134e8e885f7908de4682ad0385bbf1d7b.png)

These will give you Dynatrace pre calculated ‘estimated’ number of active users and sessions.&nbsp; it is split between mobile & web, so you might need to show this data separately.

Anyway, good luck

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 22, 2022, 6:30am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/8 "2022-04-22T06:30:27Z")

</div>

[@gopher](https://community.dynatrace.com/user/10565)&nbsp; I don’t think the value is “in memory only”, since it’s not the actual value. If you change the time frame, the value changes.

For illustration this is a sample dashboard in the Demo environment ([link](https://guu84124.live.dynatrace.com/#dashboard;id=6318fd76-96f3-4db0-adf2-13ce82bd2807;gtf=defaultTimeFrame;gf=defaultManagementZone)😞

 ![Julius_Loman_1-1650609969387.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/51ad6f045aec6b62c1412f7096f565a7c0950ebb.png)

Time frame is set to yesterday in the screenshot. You can see the metrics mentioned above by&nbsp;[@mark\_bley](https://community.dynatrace.com/user/13072)&nbsp;have the same value (expected). It’s roughly the count of user session using USQL (expected). The number of users is higher (third metric).&nbsp;  
However, you can see a&nbsp; **significant** &nbsp;difference between the mobile app tile value and other values. For days before yesterday, I can see an even bigger difference (4.8k vs 12k).

[@Yosi\_Neuman](https://community.dynatrace.com/user/6931)&nbsp;were you able to find the source? I start suspecting the value in the tile and infographic is wrong.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 22, 2022, 7:15am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/9 "2022-04-22T07:15:22Z")

</div>

Hi&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)

IMO&nbsp;/ **rest/startscreen/data/MOBILE\_APPLICATION** &nbsp;is looking as the “The Usual Suspects” here.

 ![Yosi_Neuman_1-1650611660483.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d269448ca24b120f0db3255772a77a3d77efbf23.png)

HTH

Yos

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 22, 2022, 7:18am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/10 "2022-04-22T07:18:06Z")

</div>

Sure it is, but that’s only a facade. It does not reveal the actual data source.

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [April 22, 2022, 7:31am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/11 "2022-04-22T07:31:15Z")

</div>

It is working for me also on the demo tenant, please find here&nbsp;([Account Management](https://demoid.live.dynatrace.com/#dashboard;id=8b22ceb7-2857-45a5-93d8-86639ab251c0;gtf=defaultTimeFrame;gf=defaultManagementZone)) an internal link to the dashboard or the public one here&nbsp;([https://demoid.live.dynatrace.com/dashboards/8b22ceb7-2857-45a5-93d8-86639ab251c0?auth=dt0c01.I3I7LJHTUYYUQHEHKXZDBK3G.DBBJKHB3MGDJ6OAJB5HII4SUOD22PLLVSQE3ZFJBDFMTN5JAD5352IC64LNTHLSE](https://demoid.live.dynatrace.com/dashboards/8b22ceb7-2857-45a5-93d8-86639ab251c0?auth=dt0c01.I3I7LJHTUYYUQHEHKXZDBK3G.DBBJKHB3MGDJ6OAJB5HII4SUOD22PLLVSQE3ZFJBDFMTN5JAD5352IC64LNTHLSE))

The queries used are:

```markup
builtin:apps.other.userCount.osAndVersion-std:filter(and(in("dt.entity.device_application",entitySelector("type(mobile_application),entityId(~"MOBILE_APPLICATION-773D0C09E8E14B58~")")))):splitBy():value:auto:sort(value(sum,descending)):limit(10)

```

 ![mark_bley_0-1650612598168.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f26f17b958d5c36e513c0aa411b4b475c8b7c0e9.png)

Best,

Mark

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 22, 2022, 8:48am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/12 "2022-04-22T08:48:54Z")

</div>

Ok, yes. I focused on the sessions metrics. I agree this is finally the same metric as in the tile.

Still curious how the metric ( **builtin:apps.other.userCount.osAndVersion-std** ) is calculated as it seems it does not match the count of users using USQL or sessions.

---

<div class="post-metadata">

**Author:** ![rastislav\_danis](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rastislav\_danis](https://community.dynatrace.com/u/rastislav_danis)\
**Post date:** [April 22, 2022, 8:51am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/13 "2022-04-22T08:51:29Z")

</div>

Hi Mark, can you please explain, how this metric (and similarly, web metric estimated user count builtin:apps.web.activeUsersEst) is calculated ?

Thanks

Rasto

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 22, 2022, 10:34am UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/14 "2022-04-22T10:34:06Z")

</div>

Thank you&nbsp;[@mark\_bley](https://community.dynatrace.com/user/13072)&nbsp;&&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp; for helping out and find the way to show the number of mobile users as shown in mobile application and tile from a metric, but your answer Mark raised another question&nbsp;:face\_with\_monocle: regrading which metric holds the information that _Live user activity_ tile shows

 ![Yosi_Neuman_2-1650623028794.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/5/e58488d781718bdf9dd734f23f55e4bd81215bb8.png)

And when drill down into this tile and split them by application is shows the live session

 ![Yosi_Neuman_1-1650623007729.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/b6256f47503c8f95538174c3ee5be307d078a3aa.png)

Is there a metric that holds this information too that we can put on a dashboard?

Thanks in advance

All the best and stay safe

Yos

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [April 22, 2022, 12:23pm UTC](https://community.dynatrace.com/t/which-metric-hold-the-information-regarding-mobile-current-live-users-count/34814/15 "2022-04-22T12:23:54Z")

</div>

Hi&nbsp;[@Yosi\_Neuman](https://community.dynatrace.com/user/6931),

I am afraid at the moment there is no way to recreate that exact metric since there is no dimension (or USQL parameter) to filter out live sessions. See [here](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/how-to-use-real-user-monitoring/cross-application-user-session-analytics/custom-queries-segmentation-and-aggregation-of-session-data#:~:text=Only%20closed%20user%20sessions%20can%20be%20queried.%20Live%20user%20sessions%20aren%27t%20taken%20into%20account.) for more information
