Your TMP calendar repeats 7 times every date, and it causes that "sum" function add each value 7 times.
Easier solution, is to put Distinct in your expression:
But, if you have two same values, it will take only one. Another way is, later of the script, read the Temp Calendar again, then drop the first:
LET vDateMin = Num(WeekStart(Today()-7));
LET NoOfDays = 546;
weekstart(date($(vDateMin) + recno() + 6)) as TempMRPWeek
Load distinct * Resident TempCalendar;
Drop Table TempCalendar;
Based on what you've said 910 is 7 times as much as 130. There are duplicate entries forming for the same data(probably one for each day of the week).
But the way to solve this is adding distinct in the formula:
=sum(DISTINCT if(TempMRPWeek=MRPWeek ,MRPQty,0))
This gives me the results I think you are looking for.
Hope this helps,