Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate this month and previous month amount.If i select march then it should show mar vs feb amount in straight table and by default when there is no selection it should show only Current month Vs previous month amount .
Thanks in advance.
Hi,
Please check with below exp.
for the current month: (Sum({<[Data Feed Month]={"$(=date(AddMonths([Data Feed Month],0),'MMM YYYY'))"}>} [Charge Rate]))
PrevMonth: Sum({1<SelDate={"$(=date(AddMonths(SelDate,-1),'MMM YYYY'))"}>} DollarAmount)
Thanks
Arun M
Hii narender,
For Current Month :
SUM({<MonthField = {"$(=Max(MonthField))"}>}Amount)
For Prev Month:
SUM({<MonthField = {"$(=Month(floor(AddMonths(Max(MonthField),-1))))"}>}Amount)
-Nilesh
Try this
sum({<Date = {">=$(=MonthStart(Max(Date), -2))<=$(=MonthEnd(Max(Date), -1))"},Year=,Month=>}Amount)
see the attached file
Hi all,
Its not working.
Could you give me the solution with example(qvw).
Thanks.
Hello Guys,
Anybody give me the idea??
Hi,
if(InMonthToDate(Date,Today(),0,4),1,0) as CMTD/* date which falls under current month*/,
if(InMonthToDate(Date,addmonths(Today(),-1),0,4),1,0) as LMTD/* date which falls under Last month*/
the above expressions will give you 1 and 0-whichever falls under 1 comes into that month
For the current month sales :
=sum({<CMTD={'1'}>} Amount)/*will give you the current month amount*/
=sum({<LMTD={'1}>} Amount)/* will give you the last month amount*/
current month
=SUM({<Year={$(=Max(Year))},Month = {$(=Maxstring(Month))}>}Value)
previous month
=SUM({<Year={$(=max(Year))},Month = {$(=Month(floor(AddMonths(Today(),-1))))}>}Value)
Its working now.
Thanks to all.
Narender