5 Replies Latest reply: Jan 17, 2013 7:08 AM by Prasad Dumbre

# Comparative Analysis with (previous month data)

Hi All,

I want to creat a report on comparison of : -

1)current year month(2013-Jan) -  sum( {\$<year = {\$(=Max(year))}>} Wholesale.TOTAL_QTY)

2) previous year month(2012-Jan)  -  sum( {\$<year = {\$(=Max(year)-1)}>} Wholesale.TOTAL_QTY)

3) current year month -1 (2012-Dec),

I done with first 2 points by set analysis with this formula but what set analysis i hv to use to create a graph for 3 point.

Please refer the below image for reference, i have to create such chart in QV.

If possible reply soon, its urgent.

Thanks & Regards

Suresh

• ###### Re: Comparative Analysis with (previous month data)

Hi

Try this

Last year Month Sales: (previous year month)

=Sum({<CalendarYear=, MonthName=,OrdDate={'>=\$(=MonthStart(Max(OrdDate), -12))<=\$(=MonthEnd(Max(OrdDate), -12))'}>} Total_Qty)

For Current Month Sales:

=sum({<CalendarYear={\$(=max(CalendarYear))},MonthName={\$(=Month(Max(OrdDate)))}>} Total_Qty)

For Last Month Sales:

Regards,

Nirav Bhimani

• ###### Re: Comparative Analysis with (previous month data)

Hi  Nirav Bhimani,

Can you share me the QV application where you used these expressions??

• ###### Re: Comparative Analysis with (previous month data)

HI,

PFA

Regards,

Nirav Bhimani

• ###### Re: Comparative Analysis with (previous month data)

HI ,

For the third:

i think that you need to do for srt_analyses :

{\$<year = {\$(=Max(year)), Month=(Month(todat()-1))}>}

• ###### Re: Comparative Analysis with (previous month data)

1) For Current Year, Current Month:

=sum({<CalendarYear={\$(=max(CalendarYear))},CalendarMonth={\$(=Month(Max(Date)))}>} ReceiptAmount)

2) For Same Month of Previous Year:

=sum({<CalendarYear={\$(=max(CalendarYear)-1)}>},MonthNumber={"<=\$(=max({<Year={\$(=max(Year))}>} MonthNumber))"}>}} ReceiptAmount)

3) For Prev. Month:

sum({<CalendarYear={\$(=max(CalendarYear))},CalendarMonth={\$(=Month(Max(Date)-31))}>} ReceiptAmount)

Hope this works for you . . .