Dear @SeemaK,
It is always a good idea to provide a sample input data and desired output as an example.
Actually in most cases, if a good input and desired output is provided, I don’t even need any explanation and will provide the solution.
So if this is possible for you, please provide an example of your input and desired output.
Thanks.