# Automatic Group vs Dashboard

**URL:** https://meta.discourse.org/t/automatic-group-vs-dashboard/89372
**Category:** Support
**Created:** [June 7, 2018, 3:38pm UTC](https://meta.discourse.org/t/automatic-group-vs-dashboard/89372 "2018-06-07T15:38:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [June 7, 2018, 3:38pm UTC](https://meta.discourse.org/t/automatic-group-vs-dashboard/89372/1 "2018-06-07T15:38:46Z")

</div>

Hi,

On my Discourse installation, there is a large gap between the number of users in the various trust\_level groups in the Groups section and the Users Per Trust Level numbers in the new dashboard. I’m wondering if this is a general bug?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 7, 2018, 4:22pm UTC](https://meta.discourse.org/t/automatic-group-vs-dashboard/89372/2 "2018-06-07T16:22:08Z")

</div>

Hi @outofthebox,

Thanks for reaching us about this. I agree it’s kind of ambiguous as the numbers we are showing on the Dashboard are what we call “real users” and is the count of users with this exact “trust\_level” on the “users” table.

On the other hand, the groups pages is showing your presence in a group. And basically this is cumulative. Everyone but two users should be in trust\_level\_0 group even if you are trust\_level=4 in “users” table.

Some code to show this:

```plaintext
[22] pry(main)> User.all.count
   (15.9ms) SELECT COUNT(*) FROM "users"
=> 35956
[23] pry(main)> User.where(trust_level: 0).count
   (17.8ms) SELECT COUNT(*) FROM "users" WHERE "users"."trust_level" = 0
=> 21028
[24] pry(main)> User.where(trust_level: 1).count
   (18.2ms) SELECT COUNT(*) FROM "users" WHERE "users"."trust_level" = 1
=> 13180
[25] pry(main)> User.where(trust_level: 2).count
   (17.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."trust_level" = 2
=> 1685
[26] pry(main)> User.where(trust_level: 3).count
   (16.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."trust_level" = 3
=> 37
[27] pry(main)> User.where(trust_level: 4).count
   (16.1ms) SELECT COUNT(*) FROM "users" WHERE "users"."trust_level" = 4
=> 26
[29] pry(main)> 21028+13180+1685+37+26
=> 35956

# 10 is group_id for trust_level_0 group
[30] pry(main)> GroupUser.where(group_id: 10).count
   (22.4ms) SELECT COUNT(*) FROM "group_users" WHERE "group_users"."group_id" = 10
=> 35954

```

---

<div class="post-metadata">

### Author: ![outofthebox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/outofthebox/32/83708_2.png) [@outofthebox](https://meta.discourse.org/u/outofthebox)
#### Post date: [June 7, 2018, 6:50pm UTC](https://meta.discourse.org/t/automatic-group-vs-dashboard/89372/3 "2018-06-07T18:50:04Z")

</div>

That makes complete sense! Thanks for the insightful clarification!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 7, 2018, 9:42pm UTC](https://meta.discourse.org/t/automatic-group-vs-dashboard/89372/4 "2018-06-07T21:42:01Z")

</div>


