Aggregate Table (Pivot)

I’d like to aggregate a table into a view that only includes the grouped columns and the summed column. For example everyone has hours they add each day by task and I’d like to create a view that is only the total hours a user worked by task like this example.

While I can group the table I can’t have the individual day/hour rows. What’s the best way to do this? Thanks in advance!

Hey @Ryan_Hubbard ,

Great question. In th eWeekly Report table, you will want to create a column for each task, that looks to the lower table and then filters it by the same name. Something like:

Time Entries.filter(task.containstext(thisrow.task)).time.sum()

You may have to paly with the containstext, to use that one, or just contains, but that should give you the sum of each task by week. You can do the methodology when creating the name if you want too.

Hopefully that helps!

Best,
Dan

Hi Ryan,

I just happen to be busy working on something that gives a working example of what @Dan_Demers mentioned.

Search for the Meal Planner page in the doc below. I have one table where the meals for a week is recorded, and then the screenshot shows how I list the meals per day and summarise the total calories per day.

Regards
Piet

1 Like

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