Hi @Mariagb20
please checkout this flow:

My lists look like this:


First you get all items from "List1", to get a better overview, you can also use the "Select" and "Parse JSON", overwise you can also leave them out and just work with the output of "get items".
"Get items 2" Filter Query:
Title eq '@{items('Apply_to_each')['Title']}' and Month eq '@{items('Apply_to_each')['Month']}'
Condition:
length(outputs('Get_items_2')?['body/value']) is equal to 0
Create item:
Title: @{items('Apply_to_each')['Title']}
Month: @items('Apply_to_each')['Month']
Value: @{items('Apply_to_each')['Value']}
Update item:
Id: @{outputs('Get_items_2')?['body/value'][0]?['ID']}
Title: @{items('Apply_to_each')['Title']}
Month: @items('Apply_to_each')['Month']
Value: @{add(outputs('Get_items_2')?['body/value'][0]?['Value'],items('Apply_to_each')['Value'])}
the "Get items 2" will get all items from the List2 that meet the condition of "Title" and "Month" are equal to the item we are currently running on. So we would only get back 1 item, you need to write the code by yourself to work on the item at array position "0". To not only update the field "Value", we need to calculate the current value plus the value of the item we are currently running on.
I could also think about another solution to first get all items from both lists, calculate everything within Power Automate and only write back the information into the List once, but didn't figured that out yet.
Does this help you? Otherwise please give me some more information.
Best regards
Marvin
If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.
Blog: Cloudkumpel