Hello Everyone-
I am trying to pull the MTD values Year over Year for comparison and i am not been able to come with a logic. For example what we are looking for is to pull June month's value for current year vs. 2017 based on the fiscal calendar for which we have another input file. The month is decided by the run date i.e,if the report is run today based on today's date it will determine what PERIOD_NAME data to display. So today being 6/12 it should pull JUN-18 and based on that period the program should pull the same period_name data corresponding to last year which is JUN-17 ; given the fact that June is still on going so JUN-18 values will change everyday until the JUNE's period is finished .
Please find in attached my work along with the data file, i am probably making it more complicated then it should be and would like to know if there is a better way of achieving it .
**Please note- for some reason the Period_NUM values are showing as dates like 2018-06-07 which in reality are JUN-18 (MMM-YY) format when i pull the data from Oracle Table.(please see snippet attached)
Thank you .