Portfolio Performance Evaluation - Allocation effect

I saw two different formulas for calculating the allocation effect, can someone tell me which one is correct?

  1. Ai = (portfolio weight i - benchmark weight i) x Benchmark return i

  2. Ai = (portfolio weight i - benchmark weight i) x (Benchmark return i - Benchmark total return)

Thanks

I answered this in a previous thread: