sabari161, I think you should share the correct result by doing the manual calculation along with the formula you made. Because without the correct result it is very much difficult to answer whether the formula is correct or not. Or you can share the calculation logics as well.