PowerApp tip - Sum with Filter in Power Apps

While working with Power Apps i got a requirement to update the Sum of a column for the specific month and Save it in to a column. I have tried ForAll i see it was failed.

After Using With and Filter as shown below i am able to achieve the functionality using the formulae as below.

With(
   {
      SumValue:
      Filter(
         'AccountsData',
         Month(DateFieldValue1) = Month(Now())
      )
   },
   Sum(
      SumValue,
      AmountValue
   )
)

Here SumValue will get the value from List AccountData (Data). From Accounts list Amount Value will be summed-up. 

Here we are applying the Filter based on the current month with the of the PowerApps form DateFieldValue. Getting the AccountsData and applying the filter with the DateFieldValue mentioned in the PowerApps forms. 

After Summing the value, i am going to update it in a different list. Hope this helps. 

Comments

Popular posts from this blog

Linksys Wireless Connection Failure

The security validation for this page is invalid. Click Back in your Web

Power Apps toPower Automate Error - The input body for trigger 'manual' of type 'Request' did not match its schema definition , the input String does not validate against the date