Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
After function does not work.
Please find the attached qvw.
Not able to get the data for year 2014
Thanks and Regards,
Priya
Hi Priya,
can you send qvw properly. That qvw is not work.
Please find the attached qvw
Hi Priya,
Try this expression.
sum({<FLAG={'MTD'}>}COUNT1)
I want Jan 2014 data to be populated as Dec 2013.so i used after function.
Hi,
You can use the following expression.
Sum({<Date1={">=$(=MonthStart(Max(Date1),-1))<=$(=MonthEnd(Max(Date1),-1))"}>}COUNT1)
Make sure the Date1 Field is in proper Date format.
Regards,
Nirav Bhimani
A:
Load
Date(Date#(Date1,'D\M\YYYY')) as DateField,
Alpha & '|' & AddMonths(Date(Date#(Date1,'D\M\YYYY')),1) as NextMonthDateField,
Month(Date#(Date1,'D\M\YYYY')) as MonthField,
Year(Date#(Date1,'D\M\YYYY')) as YearField,
Date(MonthStart(Date#(Date1,'D\M\YYYY')),'YYYYMM') as YearMonthField,
FLAG,
COUNT1 as CurrentMonthCount,
Alpha
Inline
[
DATE_FYYYY,DATE_MON,FLAG,COUNT1,Alpha,Date1
2013,Jan,MTD,1,A,1\1\2013
2013,Feb,MTD,2,A,1\2\2013
2013,Mar,MTD,3,B,1\3\2013
2013,Apr,MTD,4,B,1\4\2013
2013,May,MTD,5,C,1\5\2013
2013,Jun,MTD,6,C,1\6\2013
2013,Jul,MTD,7,D,1\7\2013
2013,Aug,MTD,8,D,1\8\2013
2013,Sep,MTD,9,E,1\9\2013
2013,Oct,MTD,10,E,1\10\2013
2013,Nov,MTD,11,F,1\11\2013
2013,Dec,MTD,12,G,1\12\2013
2014,Jan,MTD,23,M,1\1\2014
2014,Feb,MTD,24,N,1\2\2014
2013,Jan,YTD,13,G,1\1\2013
2013,Feb,YTD,14,H
2013,Mar,YTD,15,H
2013,Apr,YTD,16,I
2013,May,YTD,17,I
2013,Jun,YTD,18,J
2013,Jul,YTD,19,J
2013,Aug,YTD,20,K
2013,Oct,YTD,20,K
2013,Nov,YTD,21,L
2013,Dec,YTD,22,L
2014,Jan,YTD,24,N
];
B:
Mapping Load
Alpha & '|' & DateField,
CurrentMonthCount
Resident A;
FinalTable:
Load *, ApplyMap('B',NextMonthDateField,0) as NextMonthDateField2 Resident A;
Drop Table A;
Please find the attached qvw file.
I am not able to get data for month of dec.
it should be 23 for month of dec.
please help with this issue
Hi,
better if you manipulate your date in script instead of using After()
in script use AddMonths()
try like
load
*,Month(date(date#(Date1,'D\M\YYYY'),'DD\MM\YYYY')) as Mon,
Year(date(date#(Date1,'D\M\YYYY'),'DD\MM\YYYY')) as Yr,
date(date#(Date1,'D\M\YYYY'),'DD\MM\YYYY') as Date11,
MonthName(date#(Date1,'D\M\YYYY')) as MonthName,
MonthName(AddMonths(date#(Date1,'D\M\YYYY'),-1)) as Update_MonthName
resident A;
and use simple expression
like
(sum({<FLAG={'MTD'}>}COUNT1))
Regards,