Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to gross up with tax rate as below at script load. However, the rate that get applied is first rate that I have given which is 1.2571 and else condition rate of 1.2459 does not get calculated.
I get 1.2571 for the total period.
If([Business Date]<='12/31/2014',([Pkg Revenue]*1.2571),([Pkg Revenue]*1.2459)) as [Pkg Revenue]
I'm having 11.2 SR7 in the server. Any Idea....?
Thanks
Senarath
Hi,
Please find the attachment for the solution .
The Expression is
If(Date([Business Date],'MM/DD/YYYY')<='12/31/2014',([Pkg Revenue]*1.2571),if(Date([Business Date],'MM/DD/YYYY')>='01/01/2015',([Pkg Revenue]*1.2459))) as [New Pkg Revenue]
Hi
Then the if condition is always satisfied. Do you have any dates after Dec 31? If so, then check your date formatting, as either [Business Date] or '12/31/2014' are not being interpreted correctly as a date.
HTH
Jonathan
Hi,
Try formatting date in Date#('12/31/2014', 'MM/DD/YYYY') in the condition instead of directing using it.
Hello,
try using date(date#([your date],'MM/DD/YYYY')).
HTH
Hi Senarath,
Please check whether dates after the 12/31/2014 is so then only the condition will get satisfied.
As Jonathan said check for the date format and covert both the date to same format like:
Date([Business Date],'MM/DD/YYYY')<='12/31/2014 this should work. If not please post your app with sample data
Hi,
I applied date format also and did NOT work
If(Date#([Business Date],'MM/DD/YYYY')<='12/31/2014',([Pkg Revenue]*1.2571),if(Date#([Business Date],'MM/DD/YYYY')>='01/01/2015',([Pkg Revenue]*1.2459))) as [Pkg Revenue],
FIRST Rate get applied to all the period and not the second.
Pls find attached the excel data file FYI...!!!
Thanx
Hi,
Please find the attachment for the solution .
The Expression is
If(Date([Business Date],'MM/DD/YYYY')<='12/31/2014',([Pkg Revenue]*1.2571),if(Date([Business Date],'MM/DD/YYYY')>='01/01/2015',([Pkg Revenue]*1.2459))) as [New Pkg Revenue]
Hi,
Try like this
Date#() will give you the date in numeric format.
If(Date([Business Date],'MM/DD/YYYY')<='12/31/2014',([Pkg Revenue]*1.2571),if(Date([Business Date],'MM/DD/YYYY')>='01/01/2015',([Pkg Revenue]*1.2459))) as [Pkg Revenue],
OR
If(Date([Business Date],'MM/DD/YYYY')<=MakeDate(2014, 12, 31),([Pkg Revenue]*1.2571),if(Date([Business Date],'MM/DD/YYYY')>=MakeDate(2015, 1,1),([Pkg Revenue]*1.2459))) as [Pkg Revenue],
Hope this help you.
Regards,
Jagan.
Hi All,
I found the issue. All the replies that you guys had posted apply correctly. However, I just verified that environmental variables in Main page is as default as I had customized date format as DD/MM/YYYY.
When I changed that to default, problem was solved.
Many thanks you guys.
Senarath