Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to display the last 6 months sales (not accumulated) figures from todays date. Do i do this in the expression, script or by using variables.
Regards
O yeah, i can't use Dimension limit because i have some figures in future months, that's why i need the previous 6 or 12 months from today rather than the last date in the MonthEnd field.
Thanks
Hi,
You can do this by using expression.
Like
Sum({<dateField={"<$(=Today())>=$(=Addmonths(Today(),-6))"}>}Sales)
Regards,
In expression write like
Sum({<Month ={'>$(=num(Month( AddMonths( Today(),-6))))<=$(=num(Month(Today())))'}>} Sales)
What shall i use for the Dimension? i've tried using Month and i get "No data to display in the chart"
Hi,
Use Customer Number, any KPI which you want show against Month sales
Regards,
Dimension
Your KPI (i.e. [Customer Name] or Country or Brand or Supplier etc.)
There are two different approaches shown below.
1) Based on Date Field
=SUM({<[Your Date Field] = {">=$(=AddMonths(MonthStart(Today()),-5))"}>}Sales)
Note : [Your Date Field] should be having same format as per your script Date Format
SET DateFormat = '';
2) Based on YearMonth
if you create YearMonth Field in your script as below
Date (monthstart ([Your Date Field]) , 'YYYYMM') | as YearMonth, |
You can use below expression
=SUM({<YearMonth = {">=$(=Date(AddMonths(MonthStart(Today()),-5),'YYYYMM'))"}>}Sales)
Hope this helps....!!!
Have you tried the solution provide by me?
I'll get back to this soon and let you know how i get on.