Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
I Select year 2017 and Month July then i want to get a value last 12 month separately. it as below
I SELECT
MONTH FIELD = JULY
YEAR FIELD = 2017
THEN I WANT VALUE AS GIVEN BELOW
JULY 2016 |
AUGUST 2016 |
SEPTEMBER 2016 |
OCTOBER 2016 |
DECEMBER 2016 |
NOVEMBER 2016 |
JANUARY 2017 |
FEBRUARY 2017 |
MARCH 2017 |
APRIL 2017 |
MAY 2017 |
JUNE 2017 |
I Already use Tran cal given below
Trandatecalender:
LOAD
DAY(TRAN_DATE) AS TRAN_DAY,
DATE(TRAN_DATE) AS TRAN_DATE,
DATE(monthstart(TRAN_DATE), 'MM-YYYY') as MONTH_YEAR,
WEEK(TRAN_DATE) AS TRAN_WEEK,
YEAR(TRAN_DATE) AS TRAN_YEAR,
MONTH(TRAN_DATE) AS TRAN_MONTH,
MONTH(TRAN_DATE) &'-'& WEEK(TRAN_DATE) AS MONTH_WEEK;
LOAD DATE (TRAN_MINDATE + ITERNO() -1) AS TRAN_DATE WHILE (TRAN_MINDATE + ITERNO () -1) <= NUM (TRAN_MAXDATE);
LOAD
MIN(TRAN_DATE) AS TRAN_MINDATE,
MAX(TRAN_DATE) AS TRAN_MAXDATE
RESIDENT PL;
Please help get a last 12 month value
sagara
Are you expecting this in Script / UI ??
Hi,
If you are using in UI level so use below expression. I hope it will help you.
sum({<Date={'>$(=MonthStart(max(Date),-12))<$(=MonthEnd( max(Date),-1))' },MonthYear=,YEAR=>}Sales)