# Show the total monthly sales per user

**URL:** <https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126>\
**Category:** Ask for Help\
**Created:** [April 28, 2023, 7:04pm UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126 "2023-04-28T19:04:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo\_Falconi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/paolo_falconi/32/1019_2.png) [@Paolo\_Falconi](https://community.glideapps.com/u/Paolo_Falconi)\
**Post date:** [April 28, 2023, 7:04pm UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/1 "2023-04-28T19:04:33Z")

</div>

Basically, I want to show the monthly sales per user, not the total of all sales per user.

I have an array which brings the months of the sales per user, but I only want to show the current month (“which is 4”) removing the other months (in this case it only appears the “3” but I don’t want to show any of them except the current)

Maybe I’m doing it the wrong way.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/7/070fd2ee795edb7c6a4f0b29b248cd71a07e9a02.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [April 28, 2023, 7:45pm UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/2 "2023-04-28T19:45:14Z")

</div>

First, use the math or format date column to convert sales dates and search dates to MMYYYY format, then IF-ELSE column to find matching sales, then use rollup to sum them. you can add user email to formatted dates, to extract specific users.

---

<div class="post-metadata">

**Author:** ![Paolo\_Falconi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/paolo_falconi/32/1019_2.png) [@Paolo\_Falconi](https://community.glideapps.com/u/Paolo_Falconi)\
**Post date:** [April 28, 2023, 8:18pm UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/3 "2023-04-28T20:18:06Z")

</div>

Thanks for the reply! Ill try that. I always struggle with dates

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 29, 2023, 2:17am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/4 "2023-04-29T02:17:09Z")

</div>

Expanding on Uzo’s idea:

- Create a math column in your User Profiles table:

YEAR(D)\*100+MONTH(D)

With D being the “now” value. You would get 202304 for today.

- Create a math column in your sales record table.

YEAR(D)\*100 + MONTH(D)

WIth D being the date of the sales record.

- Create a relation from the user profiles table to the record table, make it match multiple rows, then rollup the sales value.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [June 24, 2023, 1:42am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/5 "2023-06-24T01:42:19Z")

</div>

> [@ThinhDinh](#):
>
> YEAR(D)\*100+MONTH(D)

How would this math formula change when for looking at prior month vs current month

YEAR(D)\*100+MONTH(D)-1?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 24, 2023, 1:45am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/6 "2023-06-24T01:45:15Z")

</div>

You could use Year(Date)\*12 + Month(Date), and then subtract 1 from that for the previous month.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 24, 2023, 1:48am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/7 "2023-06-24T01:48:04Z")

</div>

> [@Joe\_Gabriele](#):
>
> YEAR(D)\*100+MONTH(D)-1?

That will fail at the year boundaries.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [June 24, 2023, 1:58am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/8 "2023-06-24T01:58:12Z")

</div>

> [@Darren\_Murphy](#):
>
> Year(Date)\*12 + Month(Date)

(YEAR(D)\*12)+(MONTH(D)-1)

D = Now

Using this, the value that shows is 24281. Is it supposed to show 202305?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 24, 2023, 1:59am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/9 "2023-06-24T01:59:52Z")

</div>

No. It doesn’t give a “human readable” result, but it’s useful when you need to add/subtract months.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [June 24, 2023, 2:00am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/10 "2023-06-24T02:00:40Z")

</div>

Ok thanks! as long as it works, thats all that matters!

So essentially next month it will show 24282?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 24, 2023, 2:07am UTC](https://community.glideapps.com/t/show-the-total-monthly-sales-per-user/61126/11 "2023-06-24T02:07:15Z")

</div>

24282 is June 2023  
Next month (July) will be 24283 🙂
