# Conditional hours Rollup

**URL:** https://community.glideapps.com/t/conditional-hours-rollup/49940
**Category:** Ask for Help
**Created:** [September 22, 2022, 10:44pm UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940 "2022-09-22T22:44:56Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 22, 2022, 10:44pm UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/1 "2022-09-22T22:44:56Z")

</div>

Hello there!  
Could anybody help me please.  
I want to get a total of spent hours per user per domain ?  
A user can be related to many domains as well as a domain can be related to many users. So i need to rollup hours spent in a specific domain by a specific user so that a specific user could get seperate sum of hours spent for each domain he subscribe.

Thank you in advance for your help.

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [September 22, 2022, 11:24pm UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/2 "2022-09-22T23:24:30Z")

</div>

Do other users need to see this rollup or only the signed in user?

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 5:58am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/3 "2022-09-23T05:58:47Z")

</div>

Other users need to see this rollup. each user need to see their performances

---

<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: [September 23, 2022, 6:18am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/4 "2022-09-23T06:18:09Z")

</div>

Asking Bob’s question in a different way…

If I am a user, and you are another user, should I be able to see the rollup of your data?  
Or should I only see my own data?

Also, can you add a screen shot please that shows how the data is laid out. This will help to visualise the best solution.

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 7:29am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/5 "2022-09-23T07:29:08Z")

</div>

![CAPTUREEcran2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/d/9d10bde4fe4573bbb6fe80fa9afdb56788fa3aeb.png)

Yes you should be able to see the rollup of my data.  
As you can see on the screenshot. there are two challenges (it could be more than 2, as more challenges will be added).  
I want to rollup for exemple N’DIA HERVE’S Total hours for the challenge “62 HEURES” and Total hours for the challenge “500 HEURES” seperately and all users could be able to see each other results.

Here is the result i have for the moment  
 ![CAPTUREEcran3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/5/35d0a86b285fe79fd8f9f191734e67174165ac5b.jpeg)  
This rollup show the total hours combining the 2 challenges.

---

<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: [September 23, 2022, 7:40am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/6 "2022-09-23T07:40:47Z")

</div>

Okay, simple solution…

- Create a template column that joins the values in the Identifiant and Challenge columns in your PSC\_Rapport table
- Create a multiple relation column that matches that template column to itself
- Now do your rollup through that relation

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 8:41am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/7 "2022-09-23T08:41:37Z")

</div>

Thank you for your response but i have already use this trick and it does not work as i want. This method combines all challenges.

 ![CAPTUREEcran4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/d/8dddfb66583fbb7d5f5f517658eda28adf7358a0.jpeg)  
 ![CAPTUREEcran5](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/a/7a5be49b34179accaad3c88dcb54aaa2a3fb07c3.jpeg)

---

<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: [September 23, 2022, 8:48am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/8 "2022-09-23T08:48:08Z")

</div>

It shouldn’t.

Can you show me how your relation column is configured please?

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 9:00am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/9 "2022-09-23T09:00:36Z")

</div>

![Relation_Config](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/f/6fa60f05679b6b4f53797f5847b38c5313caed33.jpeg)

---

<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: [September 23, 2022, 9:23am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/10 "2022-09-23T09:23:34Z")

</div>

Okay, that looks correct. Can I also see the configuration of your rollup column?

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 9:32am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/11 "2022-09-23T09:32:58Z")

</div>

![Rollup_Column](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/2/02d45851815a05c5b7fed281f9f6ca5e0e9d3b60.jpeg)

---

<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: [September 23, 2022, 9:38am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/12 "2022-09-23T09:38:03Z")

</div>

Okay. Again, correct.

You say it isn’t working, but I think it is.  
For example, I see a different value in row 4.

Now, I know you would expect the values in rows 1/2/3 to be different from the values in rows 5/6.

Two things could explain why they aren’t different:

- either both sets do actually sum to 685, or
- something is wrong with the template

So, one more screenshot please, of your template column configuration

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 9:48am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/13 "2022-09-23T09:48:48Z")

</div>

The expecting results are  
Line 1 : 120+150+165 = 435 hours for N’DIA HERVE’s performance in challenge 62 HEURES  
Line 2 : same as line 1  
Line 3 : same as line 1  
Line 4: 150 hours for N’DIA SANDRINE’s performance in challenge 500 HEURES. And i think this is correct because she has not subscribe in more than one challenge  
Line 5: 90+160 = 250 for N’DIA HERVE’s performance in challenge 500 HEURES

 ![Template](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/5/25db8483497415772a8796f158f40ed2b07d73e2.jpeg)

---

<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: [September 23, 2022, 9:53am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/14 "2022-09-23T09:53:07Z")

</div>

Yes, there is the problem there - with your template.

Change it to something like this:

 ![Screen Shot 2022-09-23 at 5.52.23 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/7/375d9848467c9f6aa73980dfaba60e2767d70ae4.png)

The way you have it now, it’s just returning the user name without the challenge, which explains the result that you are getting.

---

<div class="post-metadata">

### Author: ![ndiapro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ndiapro/32/58235_2.png) [@ndiapro](https://community.glideapps.com/u/ndiapro)
#### Post date: [September 23, 2022, 10:06am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/15 "2022-09-23T10:06:40Z")

</div>

once more you solve the issue and i’am learning from you. THANKS A LOT DARREN.

here is the result

 ![Result_OK](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28f018727577070afbc5ca76d3453063e22b3172.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [September 24, 2022, 10:06am UTC](https://community.glideapps.com/t/conditional-hours-rollup/49940/16 "2022-09-24T10:06:48Z")

</div>

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