Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
For calculating MTD YTD i used the approach stated in this usefull post,
http://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/
but dnt knw why it didnt work for me,
firstly i defined monthid ,
expressions used ,
Count({$<MonthID = {“<=$(=Max(MonthID))”},
Year = {$(=Max(Year))},
Quarter = ,
Month = >} FILE_NO)
Count({$<MonthID = {$(=Max(MonthID))},
Year = ,
Quarter = ,
Month = >} FILE_NO)
Can anybody tell wht wrong i did in this approach,
Hi,
QlikView use case sensitive. Try to change MonthID to MonthId and see the result.
Regards,
Sokkorn
Apolozise for tht,
but i needed some othr method, n in tht post i specified the method m using so posted in diff thread.
whts happening in this method is,
whn m not selecting any year month, it result is fine
but whn i select previous year, i.e 2012, it projects the dec 2012 data as MTD
and also pls share some logic for calculating MTD YTD, m looking out for options to handle this.
Thanking You
Hi prash,
How about this kind of approach: (no need to create a MonthID)
YTD:
Count({<Date = {">=$(=YearStart(max(Date))) <=$(=max(Date))"} Year =, Month = >} FILE_NO)
MTD:
Count({<Date = {">=$(=MonthStart(max(Date))) <=$(=MonthEnd(max(Date)))"} Year =, Month = >} FILE_NO)
Regards,
Lester
HI Lester Rosete,
can u help me , how to do LMTD using this expression
Count({<Date = {">=$(=MonthStart(max(Date))) <=$(=MonthEnd(max(Date)))"} Year =, Month = >} FILE_NO)
??????
Hi,
Something like below,
Count({<Date = {">=$(=MonthStart(AddMonths(max(Date), -1))) <=$(=MonthEnd(AddMonths(max(Date),-1)))"} Year =, Month = >} FILE_NO)
Satya