I have seen previous examples of flows that add up all values based on a group in a sharepoint list and then deposit the sum into a column in a different sharepoint list, but I was wondering how I might build a flow when there are multiple conditions.
To Illustrate, Here's the list I start with:
And every time I update or add a row, I want the flow to update and sum up based on the conditions of name and activity.
In previous posts, the addition was only based on one condition such as name, but I was wondering if it would be possible to also include a choice column all in one flow, or I would have to do a new flow for each choice (which seems rather wasteful)
Hi @JJJJLow
Did you manage to find any solution? I have very similiar flow to build and looking for the solution for almost 2 weeks. Still not able to build any flow succesfully... will be grateful for any suggestions!
For example, you can read the Data from one Sharepoint list every evening with a scheduled trigger and post the Output to another Sharepoint list.
Thank You. While this does work to get the desired output, my goal was to do this but also maintain two separate sharepoint lists.
Doing the addition is one select action:
With From:
sort(
union(
xpath(
xml(json(concat('{"root":{"item":', outputs('Data'),'}}'))),
'//Name/text()'
),
json('[]')
)
)
Name:
item()
Sleep:
xpath(
xml(json(concat('{"root":{"item":', outputs('Data'),'}}'))),
concat('sum(//item[Name="', item(),'" and Activity="Sleep"]/Time)')
)
Other properties are the same (substituting the activity accordingly)
Output:
[
{
"Name": "Duke",
"Sleep": 5,
"Exercise": 0,
"Eating": 4
},
{
"Name": "Joe",
"Sleep": 12,
"Exercise": 16,
"Eating": 0
},
{
"Name": "Nancy",
"Sleep": 0,
"Exercise": 0,
"Eating": 2
}
]
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2