Welcome to the forum!

Please provide some sample data to illustrate the calculations you are trying to make.