Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
I have ticketing application which logs number of calls per month. I have data for 5 years. I want to calculate what variance between calls during same period last year around same month to guage the trend.
How do I go about doing this.
please help.
thanks
See attached example
edit: see here for an explanation of the approach used.
Hi,
Pass the current monthyear to a variable in form of a date. Create a second variable using the first variable with addmonths function.
eg:
vCurrDate = Max(Date);
vCurrMonthStart = Date(Floor(Monthstart(max(Date))),'DD-MM-YYYY')
vPrevCurrDate = Date(Addmonths($(vCurrDate),-12),'DD-MM-YYYY')
vPrevMonthStart = Date(Addmonths($(vCurrMonthStart),-12),'DD-MM-YYYY')
Use these variables to limit the dates in the formula.
Regards,
Thanks Vivek
Can you please explain what your formula does and how it is tied to us getting current month vs same month last year.
I have create a example app with your suggestion can you please take this and show me how you will use this to show current month vs last year same month data trend.
thanks.
Any update Vivek or anyone else.
thanks
vPrevMonthStart = Date(Addmonths($(vCurrMonthStart),-12),'DD-MM-YYYY')
is not giving me the right results eather.
Hi,
Am leaving for office...will send u the codes later in the evening.....
Regards,
Vivek
Hi amiuni66,
Here is a clue
Sum({$<Years = {$(=Max(Years)-1)}, MonthNum = {$(=Max(MonthNum))}>} NoOfCalls) ==>Return value in previous year
Sum({$<Years = {$(=Max(Years))}, MonthNum = {$(=Max(MonthNum))}>} NoOfCalls) ==>Returen value in current year
See sample attached file also.
Note: I just add one field in load script Num(Month(IncidentDate)) As MonthNum,
Regards,
Sokkorn
Thanks Vivek. I will look forward to it.
Thanks Sukkorn. I tried your solution it works without any selection but when you select any month-year it does not show proper results for prior year. it shows Zero.
Hi,
Try this for last year month sales-
Sum ({<Date = P({<Year={$(=max(Year)-1)}>}Date)>}Sales)
Regards,
-Neha
Hi amiumi,
Please check the attached file.This is very useful for you