I'll first reproduce my problem here:
I have 3 tables:
The upper left one contains the raw score (RawScore), the upper right one contains some modifications we want to apply to the scores (ScoreMod). And the lower one is the total score (Total).
I calculated the Tom's "effective scores" for each day by adding the modifiers to the raw scores with the following formula:
When I put this formula at D12, and it correctly calculates the effective scores.
Then I define a name with the above function, called it "EffectiveScore"
The problem is that when I try to calculate the Tom's total score, by having
At B12, the amount is not correct, it shows 500, instead of 480.
But if I replace the formula with
,
It returns the correct result, 480.
Why do I have to wrap the formula with bunch of useless extra functions to get the right result?
This sample worksheet is available at Sum is incorrect.xlsx
I have 3 tables:
The upper left one contains the raw score (RawScore), the upper right one contains some modifications we want to apply to the scores (ScoreMod). And the lower one is the total score (Total).
I calculated the Tom's "effective scores" for each day by adding the modifiers to the raw scores with the following formula:
Excel Formula:
=LET(
MyDate,FILTER(RawScore[Date],RawScore[Name]=Total[@Name]),
MyRawScore,FILTER(RawScore[Score],RawScore[Name]=Total[@Name]),
MyModifier, XLOOKUP(MyDate, FILTER(ScoreMod[Date], ScoreMod[Name]=Total[@Name],0), FILTER(ScoreMod[Modifier], ScoreMod[Name]=Total[@Name],0), 0),
MyModifier+MyRawScore)
When I put this formula at D12, and it correctly calculates the effective scores.
Then I define a name with the above function, called it "EffectiveScore"
The problem is that when I try to calculate the Tom's total score, by having
Excel Formula:
=SUM(EffectiveScore)
But if I replace the formula with
Excel Formula:
=SUM(MAP(EffectiveScore, LAMBDA(x, INT(x))))
It returns the correct result, 480.
Why do I have to wrap the formula with bunch of useless extra functions to get the right result?
This sample worksheet is available at Sum is incorrect.xlsx