Hello luciapernambuco
I am V. Arya, Independent Advisor, to work with you on this issue. The formula within calculated field will work only on the fields which you drag inside Values section. It won't work for Rows section fields. Hence, the workaround is to create a helper column and drag helper column also to pivot (for aesthetics purpose, you may need to hide this column itself)
Then you can use following formula (as per my helper column). Also notice single quote around Total Invest.
= IF('Helper column' >0,('Total Invest' +Corretagem )*0.15,0)
Sample file @ https://1drv.ms/x/s!AgiTQGHVw-zChCZbRdk_C70a2IV...