Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a calendar and a sales table,
In my chart I want to show the, Current Year Sales, Previous Year Sales and the avg sales of the last four months of the current year?
I also have a Year and month filter.. How can I do this??
Thank you!
Hi
Try this Expression
avg({<Datefiled={'>=$(=Date(addmonths(max(Datefiled),-4)))<=$(=Date(Max(DateField)))'}>}Amount)
Hi,
Try this
=Sum({<DateFieldName={'>=$(=MonthStart(AddMonths(Max(DateFieldName), -4)))<=$(=Max(DateFieldName))'}>} Sales)/4
Hope this helps you.
Regards,
Jagan.
Hi,
Try this expression
= Sum({<TodayNum={'>=$(=(Num(AddMonths(Today(),-4))))<=$(=(Num(Today()))'}>}Sales))
where TodayNum = Num(Today()) / 4
Hope its useful for u.
Regards,
Iyyappan
Hi,
Try this
Current year=Sum({<Year={'$(=Max(Year))'}>} Sales )
Previous year =Sum({<Year={'$(=Max(Year)-1)'}>} Sales )
Average sales of last four months =Sum({<Date={'>=$(=MonthStart(Max(Date), -4))<=$(=Max(Date))'}>} Sales)/4
Instead of Max(Date) you can use today()..
Hope this helps you.
Hi,
Try the updated expressions, which ignores the Year and Month dimensions.
Current year=Sum({<Month=, Year={'$(=Max(Year))'}>} Sales )
Previous year =Sum({<Month=, Year={'$(=Max(Year)-1)'}>} Sales )
Average sales of last four months =Sum({<Month=, Year=,Date={'>=$(=MonthStart(Max(Date), -4))<=$(=Max(Date))'}>} Sales)/4
Regards,
Jagan.