Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table which contain datas like,
Sample data is
Date, Sales
15/10/2009, 200
16/10/2009, 300
17'10/2009, 400
15/11/2009, 250,
16/11/2009, 350,
17/11/2009, 450
Now my requirement is like if i select 16/11/2009 it should show me value for same day with prev month i.e 16/10/2009 value i.e 300 and in another column ratio of 16/11/2009 value to 16/10/2009 i.e 350/300
And also full month i.e 11 then it should calculate ratio of full month value of 11 with full month value of prev month i.e 1050/950
Can anyone help me how to solve it by using set analysis?????
Hi
Try something like
(SUM({<Date = {$(#=Date(Date))}>} Sales) - before(SUM({<Date = {$(#=AddMonths(Date(Date)),-1,0)} >} Sales)) / before(SUM({<Date = {$(#=AddMonths(Date(Date)),-1,0)}>} Sales))
Hi
Try something like
(SUM({<Date = {$(#=Date(Date))}>} Sales) - before(SUM({<Date = {$(#=AddMonths(Date(Date)),-1,0)} >} Sales)) / before(SUM({<Date = {$(#=AddMonths(Date(Date)),-1,0)}>} Sales))
Here is a simple example where I have multiple columns doing month to date comparisons for sequential months. In this case I just verify a date is in the month in question and sum the values
//current month
=sum(
if(
InMonthToDate(ORDERDATE, Today(), 0),
AMOUNT
)
)
//for the previous month
=sum(
if(
InMonthToDate(ORDERDATE, Today(), -1),
AMOUNT
)
)
hi Miguel,
For last month same day it is working properly. Thanks for the solution. Now i want last MTD wise so i am working on that.
Hi kal,
Thanks for the solution. But unfortunately what you have sugested that for without selection but if u select some particular date then it is not working . So i am working on that.
hi Miguel,
Thanks for solution MTD wise also coming.