wow Raf, you caught a good point. Even I forgot that point we might have 0000 period. I have just checked the value's in PROD, and could see that we got few blank 0fiscper3 for which the same row is having calyear/quarter as 0000. So that is the reason I got irrevelant values. I have excluded this cal quarter 0000 and the value is matching with 0fiscper3 = 1- <user input 0fiscper3>. You are awsome. thanks for the catch.
Happy weekend, my week task is complete. Will post some thing on monday if i get stuck again
Cheers
DR