Hi - I am trying to create a solution which requires me do summation of column and multiplied by another field and in the next column i need to take the difference between last two entries in the summation column. I have used collection but i am not able to patch in the database. below is the snippet of code used.
Backend is SharePoint. PowerApps is canvas.
Patch(
'Service Level',
Defaults('Service Level'),
{
Title: TxtTitle.Text,
Market: TxtTitleName.Text,
Month: TxtMonth.Text,
WeekDay: TxtDay.Text,
Week: TxtWeekCalc.Text,
ISOWeekNum: TxtISOWeek.Text,
'Client Date TimeZone': DateValue(TxtTodaysDate.Text),
'Client Time Interval': TimeValue(TxtTimeIntervals.Text),
IST: TimeValue(TxtISTCalc.Text),
'Cumalative SLA': Value(TxtCumSLAValue.Value),
'Hourly SLA': Value(TxtHourlySLAValue.Value),
Unasigned: Value(TxtUnassignedVal.Value),
LQTs: Value(TxtLQTVal.Value),
'Slot Status': Value(TxtSlotStatusVal.Value),
'Chat FC': Value(TxtChatFCVal.Value),
'Received Chats': Value(TxtChatRecvdVal.Value),
'FC VS Rec': Value(TxtFCvRecvdVal.Value),
'Required FTE': Value(TxtReqFTEVal.Value),
'Scheduled FTE': Value(TxtSchFTEVal.Value),
'Present FTE': Value(TxtPreFTEVal.Value),
SumProdRecvdCumSLA: Sum(
Filter(
colServiceLevel,
Market = TxtTitleName.Text
),
'Received Chats'
) * Value(TxtCumSLAValue.Value),
RowDifference:Last(FirstN(colServiceLevel,CountRows(colServiceLevel))).SumProdRecvdCumSLA
}
);