Totals for the row when a condition is met

Hello All, I am working on a dataset where I need to calculate the total under specific set of conditions.
image

The total for the column 1 should be blank.
But for the rest of the totals, the calculations should be such that it the column B is Yes, then it calculate the total and continue to the total until the condition in column B is met with a Yes.
How can the cumulative total be achieved conditionally.
I have tried using the maxx function to calculate the cumulative but that is not working.

Appreciate all the help!

Thank you
TestTrack.xlsx (9.5 KB)

HI @Vsb79 - Check the solution in the attached PBIX file.

Thanks
Ankit J
Vsb79.pbix (27.9 KB)