Hi Priyanka08,
I would prepare my data in the script in order to have it ready to be plotted. To substract current month to the previous one, i would order my table by Month Asc then use PREVIOUS(). Here's a sample :
YTD :
Load * Inline
[ MONTH, YTD
1, 100
2, 150
3, 340
4, 500
5, 600
6, 750
7, 965
8, 1000
9, 1145
10, 1647
11, 1800
12, 2000];
MTD :
NoConcatenate
Load *,
if(isnull(Previous(YTD)), YTD,YTD - Previous(YTD)) as MTD
Resident YTD;
DROP Table YTD;
Regards,
Zouhair