Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts
I want values of previous 2 months on selection of particular month.It should group by month wise.
On clear selection also it should display last 3 months which i got from following expression:
(Aggr(Sum({< link_Date={">=$(vLast3Months)<=$(vCurrentDate)"}, [Fiscal Year]=, [Fiscal Month]= >}
Sale),[Fiscal Year], [Fiscal Month], link_Dealer))
For example on selection i want , If i select jan 2015 then it should dislpay data of jan 2015,dec 2014,nov 2014
on the selection jan 2015 .
plzz give the solution fast its urgent. Im getting stuk in this problem.
Thanks in advance.
May be this:
vLast3Months = Date(AddMonths(MonthStart(RangeMin(Today() -1, Max([Calendar Date]))), -2), 'DD-MM-YYYY')
vCurrentDate = Date(MonthEnd(RangeMin(Today() -1, Max([Calendar Date]))), 'DD-MM-YYYY')
Sum({< link_Date={"$(='>=' & $(vLast3Months) & '<=' & $(vCurrentDate))"}, [Fiscal Year]=,[Fiscal Month]= >}Sale)
How do you define your variables-> vLast3Months and vCurrentDate?
Not sure why you need a Aggr for, but try this:
(Aggr(Sum({< link_Date={"$(='>=' & Date(AddMonths(MonthStart(Max(link_date)), -3), 'YourDateFormat') & '<=' & Date(MonthEnd(Max(link_date)), 'YourDateFormat'))"}, [Fiscal Year]=, [Fiscal Month]= >}
Sale),[Fiscal Year], [Fiscal Month], link_Dealer))
(vLast3Months)=MonthStart(AddMonths(Date(Rangemin(Today()-1,Max([Calendar Date])),'DD-MM-YYYY'),-2))
(vCurrentDate)=Date(Rangemin(Today()-1,Max([Calendar Date])),'DD-MM-YYYY')
Its showing result of only jan month ,on selection of jan month.
But i want it as jan 2015 ,dec 2014, nov 2014 values .
See if one of these help:
(Aggr(Sum({< link_Date={"$(='>=' & Date(AddMonths(MonthStart(RangeMin(Today() -1, Max([Calendar Date]))), -2), 'DD-MM-YYYY') & '<=' & Date(MonthEnd(RangeMin(Today() -1, Max([Calendar Date]))), 'DD-MM-YYYY'))"}, [Fiscal Year]=,[Fiscal Month]= >} Sale),[Fiscal Year], [Fiscal Month], link_Dealer))
Sum({< link_Date={"$(='>=' & Date(AddMonths(MonthStart(RangeMin(Today() -1, Max([Calendar Date]))), -2), 'DD-MM-YYYY') & '<=' & Date(MonthEnd(RangeMin(Today() -1, Max([Calendar Date]))), 'DD-MM-YYYY'))"}, [Fiscal Year]=,[Fiscal Month]= >}Sale)
Hi Sunny,
Your second expression is working.
But how should i use my variable in your expression.
See my 2 variables which i have posted before.
Hi Kajal,
If you attach the sample file it would be easier to provide the solution.
Regards,
Jagan.
Hi,
Try like this
Sum(Aggr(Sum({< link_Date={">=$(=vLast3Months)<=$(=vCurrentDate)"}, [Fiscal Year]=, [Fiscal Month]= >} Sale),[Fiscal Year], [Fiscal Month], link_Dealer))
Note: Both of the variables and the link_date formats should be same.
Regards,
Jagan.
May be this:
vLast3Months = Date(AddMonths(MonthStart(RangeMin(Today() -1, Max([Calendar Date]))), -2), 'DD-MM-YYYY')
vCurrentDate = Date(MonthEnd(RangeMin(Today() -1, Max([Calendar Date]))), 'DD-MM-YYYY')
Sum({< link_Date={"$(='>=' & $(vLast3Months) & '<=' & $(vCurrentDate))"}, [Fiscal Year]=,[Fiscal Month]= >}Sale)