Hi Satya,
Thanks for providing your expert suggestions and helping to complete my report. Just wanted to share what I did :
As per the formula you shared, my column was getting proper value but then I had an issue where there were multiple rows coming as per the posting date (which I had to take in Rows/free characteristics) so that at the time of calculation the char can be considered.
So to get rid of multiple line items, I modified my formula variable and replaced it with Attribute (instead of Key) and then in the ref char I took the most granular level from where the transaction data is calculated (Doc number in my case).
Then with this I did not have to take the char in rows/free char and I got the report on summary level.
Thanks a lot for the solution you provided. It helped me a lot.
Regards,
Pulkit