Performance Attribution - Allocation

Hi All,

In CFA Curriculum Volume 6 2020, on page 181 about calculation the attribution impact on performance attribution as below:

"To calculate allocation, we first calculate the contribution to allocation (Ai) for each sector. The contribution to allocation in the _i_th sector is equal to the portfolio’s sector weight minus the benchmark’s sector weight, times the benchmark sector return:

Equation (3)

Ai = (wiWi)Bi "

However, when I reach page 197, also for the allocation, the formula is Ai = (wiWi)(Bi - Benchmark return)

I’m very confused and do not know which is the correct formula. Would you guys please help emplain on this.