How to create a summaries for individual users?

I have time taking app, where I want to make a dashboard where each user can see how many hours they’ve logged and how much they need to invoice for the month - ideally shown on a card.

But I’m a little stuck on how to do this, as I can’t figure out how to roll up individual users monthly data.

Currently I have tap called ‘WorkHour’, where people log hours with a form.
Then I have an inline list set to card and restricted to showing only 1 record (I’ve seen other people use cards to show summaries, but not sure this right way around this?)
Finally i tried to make a rollup for salaries - somehow hoping it would automatically split it out pr user - but it off-course rolls everything up. I also played around with filtering, but no matter what I do It does not work.

I have the feeling Im going at this the complete wrong way, can someone point me in the right direction?

Create a multiple relation from your Users table to your Work Hours table matching the Username/UserID in each table. Then do a rollup through that relation.

Thank you… It all makes sense once it works :wink:
I also had the wrong source for the summary page.

Is it possible to only let it summarise todays month?

hehe yes, I knew that would be the next question :slight_smile:

A few different approaches, here is one:

  • Create two math columns in your Work Hours table. Both should use the following formula:
Year(Date) * 100 + Month(Date)
  • In one of the columns, replace Date with the row date. In the other replace Date with “Now”
  • Add an if-then-else column that compares the two math columns:
    – If Math1 equals Math2, then Salary
  • Now do your rollup using the if-then-else column (still through the multiple relation)

hahah being a Glide wizard comes with the capability to look into the future :man_mage:

I got a little bit of a problem getting the second column to work.

The first column looks like this.

The output is a long number - what sort of value is this…?
Can it be convert to an actual month name?

Second column I can’t really to work - tried both with “NOW” and NOW

It’s an integer that represents the Year and Month. ie. for today you will get 202210.
Whenever you’re wanting to match one date to another, it’s always best to first convert them to either integers or a string. This is because dates contain a time component - which isn’t always apparent - so direct comparisons can lead to unexpected results.

When I said “Now”, I meant this:

Not directly. Again, there are a few ways to get a Month name from a Date. Some people might suggest that you use the Format Date plugin. I won’t do that, because I don’t trust it. But you’re welcome to use it if you want. Here is what I do:

  • Add a column somewhere (anywhere) that lists the Month names - Jan to Dec in a single column
  • Determine the Month index number using the following math:
Month(Date) - 1
  • Add a Single Value column that takes From Start->Month Index, from the column that contains your list of month names.

:astonished: Did not see that, but works now - thank you again

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.