How to SumOver on Pivot Table?

Hey Guys, i’m trying to count these red cells and sum then over by name, but when I collapse the pivot table, it shows me 0. How can I sum these values?

I’m using this formula to count the red cells:
ifelse(sumOver(sum(Quantidade),[denominacao,{Nome Operador},{Hora Inteira}])<(max(Goal)/2),distinct_count({Hora Inteira}),0)

And using this one to SumOver:
sumOver(({Horas Improdutivas Quantidade}),[{Nome Operador},{Hora Inteira}])

I don’t know if this is possible with QuickSight calculated fields.

Because you are partitioning by hora, when you collapse the table it groups it together as one hora.

Do you have the ability to edit the dataset in SQL?

If so, you could make a separate calculated field that returns weather or not your nome operador during that hora is in red.

Then you would count or sum on that field without the restrictions of needing the hora in your table.