Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My following expression is not working.
SUM({<PAID_Month_Year={"<=Jul-2016"}>}PREMIUM)
Pls advise me where I am wrong
Did you check the format of PAID_Month_Year? is MMM-YYYY
It could be your PAID_Month_Year field format. How did you create the field in the script? If you use string functions to create it, set would not be to compare it like <=/ >= the way you want. You have to possible create a dual field in the script to use it in the set expression like you want.
yes
It is like this
Jan-2016 |
Jul-2013 |
Jul-2014 |
Jul-2015 |
Jul-2016 |
Jun-2013 |
my script is as blow
Month(PAID_DATE) &'-'& YEAR(PAID_DATE) As PAID_Month_Year,
try this
MakeDate(year(PAID_DATE),month(PAID_DATE)) as Paid_Month_Year
Try it like:
Load
Dual(PAID_Month_Year, MakeDate(Year(PAID_DATE), Month(PAID_DATE))) as PAID_Month_Year ;
Load
Month(PAID_DATE) &'-'& YEAR(PAID_DATE) As PAID_Month_Year,
..
Also, be careful when writing the set expression. You have to mention the the default date format like:
SUM({<PAID_Month_Year={"<=$(=Date(Date#('Jul-2016','MMM-YYYY'),'DD/MM/YYYY'))"}>}PREMIUM)
Note: the highlighted format might be different for your case.
Please also refer the attached qvw for better understanding.
Still not Resolved please post sample?
Hi Upali
Consider using numeric date formats in expression when >=<
ex.
YYYYMM or YYYYMMDD
/Teis