Modify & Add data to new dt based on certain conditions

@SunnyJha

I believe it is a repeated question from here?

Cheers