Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make MTD Value from Second Month onwards Zero

Hi All,

Hope all you doing good !!

I have one urgent requirement in that I have one table that having data for  starts from July 2016 and there is two Category and their Amount and Amount is Fixed amount. I have attached this table as Input in the excel file. I want to Show Amount which is Fixed in two columns which is MTD and YTD, so my data starts from July 2016 so it is a starting Month, Value of MTD is equal to YTD in July 2016  suppose first Account ID (100000)  having value 1000 Amount so In the July Month in 2016 than  MTD and YTD would be 1000 in both the columns . From next onwards means Aug month , I need to make MTD value as zero and YTD value 1000 same as previous Month . I need to repeat till Dec 2016 based on the Valid from and Valid to date in the input table. From Next Year , Jan 2017, new value will come suppose 2000, than in starting Month Jan 2017, MTD and YTD both 2000 and next month onwards means Feb 2017 i need to make MTD zero and same process need to repeat for each month from Feb17 till Dec 17. Only In starting Month I need to show MTD and YTD values same.

For one of the account ID 104000 data is valid from Jan 2017 as you can see in the attached Input file  so for that I need to put the logic Current Year-previous Year for the value of MTD and YTD but same logic for every month as I explained above.

Please find attached excel file for the Input  and Output and also the attached qvw.

Hope you understand this logic ,Please help me out and it is urgent and Thanks in advance.

Regards,

Deepak

0 Replies