I wanted to compare two sharepoint lists. one is forecasted expense against each resource for a particular month and other sharepoint list is the actual expenses that has come. The two sharepoint lists have same fields and column types.here, I want to check if there is any expense that has come which was not forecasted for the resource for that month. Also, want to show the Actual, forecast and the difference in Powerapp. Does anyone has any idea how can this be done? any kind of assistance is appreciated.
Since the two lists are pretty similar, for my test example, I'm adding a Number column called [ForcastMerged] and a Calculated column called [Difference] in ExpenseActual List.
The formula(which can be adjusted)for [Difference] is:
See the MS Flow screenshots and explanation below
Expression for Set Variables
Extracted from the current item of the [Apply to each] varYear: int(items('Apply_to_each')?['Year']) varMonth: int(items('Apply_to_each')?['Month']) varForecastAmount: items('Apply_to_each')?['ForecastAmount'] ID being extracted from [Get Items - Actual Expense]. varActualExpenseID: if(equals(length(outputs('Get_items_-_Actual_Expense')?['body/value']), 0), 0,first(outputs('Get_items_-_Actual_Expense')?['body/value'])['ID'])
ExpenseForcast and ExpenseActual Lists
Should you have any questions, let me know.