Getting an error while using if statement in calculated column.can anyone please help me with this issue

I am trying to learn HANA on my own.i have product id,product name,delivery date and Grossamount in my calculated view.i am trying to create calculated column where i need Grossamount in two columns based on delivery date.I have 2012 and 2013 as values for my delivery date.so i have created two column as grossamount_2012 and grossamount_2013.if i have delivery date as 4thdec,2012 i want the grossamount value to be in coloumn grossamount_2012 and the grossamount_2013 should be blank.i have written an expression like this
if("Deliverydate" <= longdate(2012-12-04),"Grossamount","0")
and it looks like this is wrong.i am getting the text Grossamount rather than values for that field in my output.so can anyone help me please?

Hi chandra
i am trying to get the same result by using sql script and CE functions.i have written the following code
select A."PRODUCTID",
       E."TEXT" as "PRODUCTNAME",
       C."COUNTRY",
       D."DELIVERYDATE",
       Sum(D."GROSSAMOUNT") as "GROSSAMOUNT"
       from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products" as A     
       inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.BusinessPartner" as B
       on A."SUPPLIERID" = B."PARTNERID"      
       inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Addresses" as C
       on B."ADDRESSID" = C."ADDRESSID"
       inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Purchase.Item" as D
       on A."PRODUCTID" = D."PRODUCTID"
       inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts" as E
       on A."NAMEID" = E."TEXTID"
       GROUP BY A."PRODUCTID",E."TEXT",C."COUNTRY",D."DELIVERYDATE"; 
this is working fine but i want to split the grossamount based on current year and last year.Any idea how to do this
In calculation view using script can we use if and case statements?

Similar Messages

  • I've bought the first season of Death Note on itunes, and i've was never able to download the 11th episode (Assault), it gives me error -50 each time I try. Can anyone please help me with this?

    the title pretty much has my question i guess. it's my first post so i'm not sur if you'll see all of it. I'll just copy paste it anyhow.
    i've bought the first season of Death Note on itunes, and i've was never able to download the 11th episode (Assault), it gives me error -50 each time I try. Can anyone please help me with this?

    Perhaps try the "Error -50," "-5000," "8003," "8008," or "-42023" section in the Specific Conditions and Alert Messages: (Mac OS X / Windows) section of the following document:
    iTunes: Advanced iTunes Store troubleshooting

  • My ipod touch is stuck on the 4.2.1 software, its a 3rd gen as well i was just wondering why i can not get the lastest update can you please help me with this issue

    i have been having an issue with updating my ipod touch for some time now and i can not seem to get it to update to the lastest update. it is stuck on 4.2.1 software and i can not update it to 4.3 or any other ios software update. can you please help me to solve this issue.

    It sounds like you actually have a 2G iPod Touch which can only go as high as iOS 4.2.1.  If it's an 8 GB iPod Touch it's definitely a 2G iPod Touch as there was never such a thing as a 3G 8 GB iPod Touch. See this article to help verify what generation iPod Touch you have.
    Identifying iPod models
    B-rock

  • Can anyone please help me with this error I am getting from my application

    javax.servlet.ServletException: Index: 0, Size: 0
         at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595)
         at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537)
         at jsp.edit__service._jspService(edit_service.jsp:117)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:847)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:229)
         at mil.usmc.m4l.servlets.M4LServlet.forward(M4LServlet.java:34)
         at mil.usmc.m4l.servlets.EditService.doGet(EditService.java:175)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at mil.usmc.m4l.filters.M4LCMSFilter.doFilter(M4LCMSFilter.java:150)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)

    user,
    my computer doesn't work, can you fix it?
    You've not provided any information whatsoever that would help someone help you solve your problem. What version of JDeveloper are you using? What technologies? What are you trying to do that is not working? You really need to be a bit more explicit with your questions.
    John

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • After a google search I click a topic, and get rederected to a completely different webpge. EVERYTIME. Can you please help me with this?

    This has been going on for weeks. I've deleted and reinstalled Firefox at least a dozen times.
    After EVERY search, I click the site i want, and get redirected to a completely different site.
    Not to mention Firefox crashes quite a bit.
    == This happened ==
    Every time Firefox opened
    == A few weeks ago

    Jailbreaking devices is a bad idea (and for most people, it's really old school). Update the devices to iOS 7 and all of your problems should go away.

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • HT201210 i keep getting errors while i try to restore my iphone. can you please help?

    Hello. I wanted to restore my iphone but i keep getting errors while i'm at it. 1015 and some others. It is still in recovery mode and i cannot seem to solve anything. Can you please help? I have an iphone 3G which used to work on iOS 4.2.1. Thanks

    ERROR 1015...
    This Error Code is indicative of the Device being jailbroken / Hacked...
    Unauthorized modification of iOS  >  http://support.apple.com/kb/HT3743
    Sorry... But...
    The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
    You will need to look elsewhere.

  • Can't get past the time and date intial set up screen can anyone please help?

    We purchased Apple TV last night, hooked everything up according to the directions, until we get to the Setting Time and Date Screen, which Apple TV- for more than 12 hours now, has been trying to establish.  We've set the time zone both manually and automatically, I have emailed and tweeted Apple Support but no help so far, this is my last plea before I return it.
    Any help would be appreciated.
    Thanks

    Welcome to the Apple Community.
    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router. (Also try removing it’s power cord for at least 30 seconds)
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
    If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • I have 500 internal server error on all my iPods/iPads today. Can anyone please help?

    Hi. We have two ipod gen 5, one iPad 2 and one iPad air. Since thus morning we can get very limited internet access. Constantly getting the message "500 internal server error". We upgraded two days ago to bt hone hub 4 and though this may be the issue but Bt assure me it's nog their fault? Does anyone have an idea how to solve this. Also I'm not a computer genius so it would have to be in layman terms!!! Thanks in anticipation

    Has anyone else experienced this as it's giving me a headache now x

  • Error while writing the data into the file . can u please help in this.

    The following error i am getting while writing the data into the file.
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="code">
    <code>null</code>
    </part>
    <part name="summary">
    <summary>file:/C:/oracle/OraBPELPM_1/integration/orabpel/domains/default/tmp/
    .bpel_MainDispatchProcess_1.0.jar/IntermediateOutputFile.wsdl
    [ Write_ptt::Write(Root-Element) ] - WSIF JCA Execute of operation
    'Write' failed due to: Error in opening
    file for writing. Cannot open file:
    C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
    BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing. ;
    nested exception is: ORABPEL-11058 Error in opening file for writing.
    Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\
    BPEL_Import_with_Dynamic_Transformation
    \WORKDIRS\SampleImportProcess1\input for writing. Please ensure 1.
    Specified output Dir has write permission 2.
    Output filename has not exceeded the max chararters allowed by the
    OS and 3. Local File System has enough space
    .</summary>
    </part>
    <part name="detail">
    <detail>null</detail>
    </part>
    </bindingFault>

    Hi there,
    Have you verified the suggestions in the error message?
    Cannot open file: C:\oracle\OraBPELPM_1\integration\jdev\jdev\mywork\BPEL_Import_with_Dynamic_Transformation\WORKDIRS\SampleImportProcess1\input for writing.
    Please ensure
    1. Specified output Dir has write permission
    2. Output filename has not exceeded the max chararters allowed by the OS and
    3. Local File System has enough space
    I am also curious why you are writing to a directory with the name "..\SampleImportProcess1\input" ?

  • Can someone please help me with this. Loading problems and error codes.

    I have several problems with itunes on my PC. I use 2 PC's and Iphone for work and I have an IPod nano. For about a week I have been having several problems with Itunes. The first problem is I cannot access the store, I get the loading screen and that is it. This screen lasts forever, nothing ever happens it just loads, and loads, and loads. . . .
    I try to sign in thinking that will help the loading issue and I get error message saying "We could not complete your itunes store request. An unknown error occurred (-50)." This happens on both computers. I also cannot download from my iphone, I get the same error message. Running diagnostics does nothing, itunes says everything is in working order. Uninstalling and reinstalling also does nothing. I have had itunes for years now and up until about 10 days ago had no problems. My itunes is not behind a firewall on either computer. I'm saying all of this because I would prefer not to get obvious answers or links that do not help me. Please someone has to know how to fix this.

    Welcome to discussions! This is the rather infamous chkdsk error which will require that you restore your iPod. The following link will give you a complete explanation/instructions.
    http://docs.info.apple.com/article.html?artnum=300554

  • Firefox no longer launches when I click the launch icon. It was working fine and then all of a sudden it won't launch. I have Vista home prremuim service pack 2. Can you please help me resolve this issue so I can once again use firefox? Thanks

    firefox was working. Now it is not. Won't launch when I click the icon. Don't know the version as I cannot get it to launch to check the version.

    https://support.mozilla.com/en-US/questions/891374
    http://kb.mozillazine.org/Browser_will_not_start_up

  • I cannot search in firefox. I try to search with google and yahoo. The page never loads and I get "Problem Loading Page", "The Connection Has Timed Out". Can anyone please HELP??????!!!!!!!!!

    I cannot search for ANYTHING, I cannot click on items listed in the yahoo search page (the top ten trending search items) the page just won't load!

    Since I looked everywhere for this answer and never found it I decided I needed to help!
    1. GO TO THE TOOL BAR WHERE IT SAYS SAFARI AND CLICK TO BRING DOWN THE MENU OF OPTIONS, CLICK ON PREFERENCES
    2.INSTEAD OF JUST CLICKING ON THE GENERAL TAB AND CHANGING THE SEARCH ENGINE LIKE EVERY OTHER STUPID SUPPORT TELLS YOU TO DO LOOK AT THE TAB THAT SAYS EXTENSIONS.
    3. Chances are you downloaded something that was made by a third party to "enhance" your web experience but really they just screwed you over, YOU CAN CHOOSE TO SIMPLY UNINSTALL ANY EXTENSIONS PUT ON YOUR COMPUTER BY CLICKING INSTALL, BUT TO BE SURE THAT THIS IS THE ROOT OF YOUR PROBLEM IN THE SECOND COLUMN SIMPLY CLICK ON THE UNDERLINED NAME OF WHO THE EXTENSION IS MADE BY IF CLICKING THE LINK BRINGS UP A YAHOO PAGE THIS IS THE SOURCE OF YOUR ISSUES AND SIMPLY UNINSTALLING THIS WILL RID YOU OF THIS  DUMB PROBLEM!!
    HOPE THIS HELPS!!!!

  • HT4009 I have been trying all day to purchase chips on Ace Casino and it tells me I have to get in touch with Itunes support and there is no number or website...Can you please help me with this.

    I need help purchasing chips on ace casino.  When I try to purchase it tells me that i have to contact itunes support but there is no number or website.  Does anybody know what to do?

    See Contact here  >  http://www.apple.com/support/itunes/contact.html

Maybe you are looking for