Feel like this should be way easier than I'm making it but I can't get this to work. I want to calculate a running total of the values in a column called Hours in a SharePoint list. This column may or may not be empty. Here is what my flow is doing
1. Initialize variable (runningTotal, Float type)
2. Get items from SharePoint list
3. Apply to each value (from Get items)
4. Increment variable runningTotal, Value = Hours (from Dynamic content)
Issue is that the runningTotal is the evaulating to the total number of the items in the list. When I walk through the loop, it increments by 1 for each item in the SP list from Get items
I tried adding a Condition to attempt to only add when the Hours field is not null, but I don't think I'm doing that right with the new Flow upates. I tried Hours is greater than 0, which failed on the items where Hours was null. I tried Hours is not equal to '' which still counted everything.
Any suggestions?
Solved! Go to Solution.
Thank you for the response. The configuration in your screenshot is what I had and was trying to describe. It was only incrementing by 1 and not taking into the account of the field in the loop.
I had to add a Condition to the loop to check if the field was not equal to null. If Yes, I incremented the value as shown in your screenshot.
Please post a screen shot of your Flow - that will make it much easier to assist.
Here is an example of now you might approach your issue.
I have a list with a number column call Available Quantity.
The Flow below loops through the list and adds the Available Quantity in each row to the variable.
When the Flow is complete, the variable holds the total of all values in the Available Quantity column.
If this addresses your issue, please mark you post as Solved.
Scott
Thank you for the response. The configuration in your screenshot is what I had and was trying to describe. It was only incrementing by 1 and not taking into the account of the field in the loop.
I had to add a Condition to the loop to check if the field was not equal to null. If Yes, I incremented the value as shown in your screenshot.
Can you supply a screenshot. No matter what I do I still only get increment by one
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
25 | |
23 | |
9 | |
9 | |
7 |
User | Count |
---|---|
41 | |
35 | |
25 | |
21 | |
13 |