Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum( {$<[TO_YEAR] = {2014},[TO_MONTH]={'JAN'}>} [PREMIUM] )
The above expression is not working properly Can some one let me know whether any thing is incorrect with this expression
Please, be more explicit. What does it mean "not properly" ?
Check the fields (low case, upper case) that they are written correctly. QV is case sensitive.
Fabrice
Please, be more explicit. What does it mean "not properly" ?
Check the fields (low case, upper case) that they are written correctly. QV is case sensitive.
Fabrice
Did you try '2014' with single quotes, like:
sum( {$<[TO_YEAR] = {'2014'},[TO_MONTH]={'JAN'}>} [PREMIUM] )
Although I select Year as 2014 results shown are for the year 2015
TO_YEAR and TO_MONTH are two dimensions?
Yea two dimensions
I also have struggled in Dates. Even 'January' connotates 'January of 2013' if we handle it only with DATE([datefield],'MMM'). In my cautious loading script, I have created in such tools so that we would be ready for using any date range:
DATEFIELD AS H.DT.O, | ||
IF(DATEFIELD>0,DATE(DATE#(DATEFIELD,'YYYYMMDD'),'(WWW) DDMMMYYYY')) AS H.DT, | ||
IF(DATEFIELD>0,'W'&WEEK(DATE#(DATEFIELD,'YYYYMMDD'))) AS H.DT.W, | ||
IF(DATEFIELD>0,'Q'&CEIL(MONTH(DATE#(DATEFIELD,'YYYYMMDD'))/3)) AS H.DT.Q, | ||
IF(DATEFIELD>0,MONTHEND(DATE#(DATEFIELD,'YYYYMMDD'),0)) AS H.ME, | ||
IF(DATEFIELD>0,MONTH(DATE#(DATEFIELD,'YYYYMMDD'))) AS H.MT, | ||
IF(DATEFIELD>0,YEAR(DATE#(DATEFIELD,'YYYYMMDD'))) AS H.YR, |
In such case, January means January of 1984......2014. Q1 means .... and so forth.
Please advise if this works for you.
The expression looks fine by itself. Can you upload a sample of your application?