Let us consider one scenario: I have two data verse tables where first table is Company with columns: CompanyName of type autonumber and CompanyDate column of type Date. Another Table Employees with columns: EmployeeName of type Autonumber, EmployeeCompany of type Text but have values matching CompanyName from Company table. Another column EmployeeDate of type Date. Another column is AmountPaid of type number. Now I have one screen where I added gallery with datasource as Company. Also in same gallery I added one Label control where I want to show the sum of AmountPaid on the basis of matching CompanyName and Month & Year from EmployeeDate matching Month & Year from CompanyDate. There should not be any delegation issue while doing this.
I used below formula:
Sum(
Filter(
Employees, // Name of the Employees table
EmployeeCompany = ThisItem.CompanyName &&
Year(EmployeeDate) = Year(ThisItem.CompanyDate) &&
Month(EmployeeDate) = Month(ThisItem.CompanyDate)
),
AmountPaid
)
I don't want to create another column in Employee table with Month-year field rather use present columns to work with.
Any help will be highly appreciated.