Subtracting zero or subtracting from zero returns no result

I have a report in answers that show variances on the previous year. I have columns number of bookings this year, number of bookings last year and a variance column however when the figure for this year or last year is zero the variance returns nothing.i.e. if I had 10 bookings last year and none this year the variance is showing nothing when it should show -10. Any ideas ?

They are basically just counts so INT data type - I'm assuming they are actually zero ? For the subtaction I cast them as floats otherwise I get an underflow error.

Similar Messages

  • Round away from zero

    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionI have been tasked to write a function to round away from zero
    I would like it to be the same as oracle round
      round(n , integer )
      http://www.di.unipi.it/~ghelli/didattica/bdldoc/B19306_01/server.102/b14200/functions135.htmwith the following exceptions if no value is given for the second parameter (integer) a default of 2 is used
    because this is typically for pennies
    the other exception is that it rounds away from 0 as in round_away_from_zero(2.351) = 2.36 and round_away_from_zero(2.32,1) = 2.4
    I am close but do not quite have it.
    create or replace function round_away_from_zero   (v_n number, v_integer pls_integer default 2) return number as
    begin
         case mod(v_n,.1*(v_integer - 1)) when 0 then
           return trunc(v_n,v_integer);
          else
          return trunc(v_n,v_integer)+ power(.1,v_integer);
          end case;
    end; here are my current incorrect results
    with t as ( select 1.231 nbr from dual union
                    select 1.101   from dual union
                    select 1.600 from dual union
                    select 1.423 from dual union
                    select .30 from dual union
                    select .9 from dual union
                    select 1.0001 from dual union
                    select 10 from dual
    select nbr,  round_away_from_zero(nbr,0),  round_away_from_zero(nbr,1), round_away_from_zero(nbr,2)
    from t;
    NBR     ROUND_AWAY_FROM_ZERO(NBR,0)     ROUND_AWAY_FROM_ZERO(NBR,1)     ROUND_AWAY_FROM_ZERO(NBR,2)
    0.3     0     0.4     0.3
    0.9     0     1     0.9
    1.0001     2     1.1     1.01
    1.101     2     1.2     1.11
    1.231     2     1.3     1.24
    1.423     2     1.5     1.43
    1.6     1     1.7     1.6
    10     10     10.1     10here are my expected resulst
    NBR     ROUND_AWAY_FROM_ZERO(NBR,0)     ROUND_AWAY_FROM_ZERO(NBR,1)     ROUND_AWAY_FROM_ZERO(NBR,2)
    0.3     1     0.3     0.3
    0.9     1     0.9     0.9
    1.0001     2     1.1     1.01
    1.101     2     1.2     1.11
    1.231     2     1.3     1.24
    1.423     2     1.5     1.43
    1.6     2     1.7     1.6
    10     10     10     10

    Hi,
    Carlovski's solution is great for numbers greater than or equal to 0.
    If you want negative numbers to round away from 0, you can do something like this:
    SELECT  nbr
    ,       SIGN (nbr) * CEIL ( ABS (nbr)
                               * POWER (10, :v_integer)
                 / POWER (10, :v_integer)     AS round_away
    FROM    t;Output, with some negative numbers, and :v_integer = 1:
    `      NBR ROUND_AWAY
           -10        -10
          -1.6       -1.6
        -1.423       -1.5
        -1.231       -1.3
        -1.101       -1.2
       -1.0001       -1.1
           -.9        -.9
           -.3        -.3

  • HT201250 i am using for first time the time machine and an external hard drive because I want to erase my macbook and start from zero files. do i keep my files in the portable hard disk when I connect it again with the macbook or the time machine will era

    i am using for first time the time machine and an external hard drive because I want to erase my macbook and start from zero files. Am i keeping my files in the portable hard disk when I will connect it again with the macbook or the time machine will erase all?
    I would like to know if after I erase all my data, empy hard drive inside the macbook, the time machine will erase all my files that I have saved in my "WD "My passport" external hard drive

    Welcome to Apple Support Communities
    Time Machine has to erase the external disk in order to make backups. Before setting Time Machine up, copy the files of your external disk to the hard disk of the Mac in order not to lose them, and then, set up Time Machine. The first backup will start automatically.
    If you want more information about Time Machine, read the Pondini's site > http://pondini.org

  • Subtracting a Credit Memo from Invoice

    I have looked all over the forum for the right answer and cant locate what I need.
    I am witting a Royalty Report and need to find the best way to subtract credit memo's from invoices.
    I know that the OINV.DocEntry = RIN1.BaseEntry but the numbers are not correct.
    If anyone can help on a query or more info on the best way to do this I award points..
    Thanks,
    Craig

    hi,
    Check this links
    LINKING CREDIT MEMO TO INVOICE
    Credit Memo and A/R Invoice linking
    Jeyakanthan

  • How do I delete a corrupted iPhoto 6 library and start again from zero?

    I have tried for days now to rebuild my iPhoto library to no avail and now I want to wipe the slate clean and build my library again from zero. I have back-ups and original memory cards to do this as well as the iLife6 install disc. How do I do this? What must I trash (and /or not trash)? Also I keep getting "star-up disc almost full messages" and would like to know (precisely) how to create more space on it. I should also mention that I am severely challenged when it comes to computer technology but would deeply appreciate any help some generous soul would give me. I'm desperate since I would like to make some iPhoto books for Xmas and at present am unable to do so.
    Sincere Thanks

    To create and populate a new library:
    Note this will give you a working library with the same Rolls and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library on your desktop and find the Originals folder. From the Originals folder drag the individual Roll Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Regards
    TD

  • My movie rental wont dowload, it says downloading but never moves from zero KB?

    Iv purchased a rental download from the iTunes store. in the downloads part of my iTunes it says it is downloading but never moves from zero KB (even after 2 hours) pausing it, restarting iTunes or even restarting my laptop doesn't help. Anyone have any ideas what I should do? 

    Does your phone have enough available memory for the movie? Maybe you will need to clear some space.

  • How to make Percentage start from zero in SSRS Report?

    Hi,
    I am new to SSRS Reporting. I have developed a small report which has percentage in it.
    My Report snapshot as below
    I want the percentage(orange line) to start from begining(from zero). As of now it starts from Feb, 2014. What am i suppossed to do to achieve this??
    Regards, Shreyas R S

    Hi Shreyas R S,
    Based on my research, it seems that the Percentage line is a line chart. In this scenario, the line should be started from the first value to the last value in the X-Axis. This is by design. If the percentage line is a horizontal line, we can use a StripLine
    to simulate it. For more details, please see:
    Click the Primary Vertical Axis and click the StripLines option in the Properties pane.
    Add a new member, select a color (Orange) for BackgroundColor item.
    In the Interval category, set a value (17) as the IntervalOffset and set the StripWidth to 0.5 to widen the line.
    To hide the original percentage line, we can right-click the percentage field to open the Series Properties dialog box, then type: =noting in the Value field in the Values pane.
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Is it possible to reset auto ID and start from zero?

    Hi All ,
    Could you please help me on this.I want to import records and want the Auto ID to start from zero.Is there any settings available for this?
    Thanks
    Arnab

    Hi,
    There is no such setting to reset Auto ID count. But the work around that you can use is ;
    Delete Auto ID field and recreate the AutoID field in the repository. This will make Auto ID count reset to Zero.
    I am not sure if you can reset it directly using Database tables. I will update you if i find some thing on this.
    Best Regards,
    Shiv

  • HT5052 i am struggling to download new software update for ipad 2 using itune: The problem is that im getting an error saying time out!!! and when i start downloading again it starts from zero!!

    The problem is that im getting an error saying time out!!! and when i start downloading again it starts from zero!!

    Their alternative option is for you to bring it into the store
    You could google and look for some download helpers (presuming they still exist, haven't used them in years) but they're freeware or adware that caches your download to help you recover from timeouts.
    the timeout is possibly caused by your ISP, if they regularly cycle routers or the such it 'burps' your connection  causeing it to cut out.
    You might try taking your laptop to your local library which may have wifi. Or, as the others have suggested, a friend's house with cable internet.

  • BB Credit transitions from zero

    Greetings,
    When I do a sho int fcx/x counters, I can see information that really doesn't make much sense to me and its not explained anywhere that I can easily find.
    One in particular is:
    <number> bb credit transitions from zero.
    I also see the same <number> LLR.
    I have 2 x 9509's with ONS 15454 in the middle. Both 9509's are reporting the same number of BB Credit transitions from zero on the ISL (and Port Channel stats) and one switch as <number> for output LRRs and the other switch has <number> for input LRR.
    This might be pure coincidence but I want to see if running out of bb credits (which is extremely unlikely over this distance) is causing the LRR events.
    I believe LRR events (where is this documented) are caused by some sort of media error outside the 9509 in this case. I can't get any stats on the ONS as the person running them just plain wont look.
    I get the feeling that I am getting a glitch in one of the DWDM links but I need to cover all bases.
    Stephen

    If anyone is interested in this posting,  I am not running out of BB credits enough to cause LRR's. It could be a pure coincidence and the media links are apparently my problem.
    Massive starvation of BB credits will apparently do something along these lines but its not my problem.  Also, an event is supposed to happen if I had starvation of BB credits.  I don't know what it would be but considering the amount of endless syslog events that comes out of the MDS switches, I am sure I would notice something.
    Stephen

  • Can't create an authority field from zero.

    I'm two weeks into heavy learning abap, and last day and a half I've been reading about authority objects. I've already succeeded in creating one with the ACTVT authority field, but I can't create an authority field from zero. I'm using a test only server, so I have full authority and play the developer and basis role in this case, to get the complete test package.
    I've tried creating a domain with fixed data values as source of the element, as well as making a table for entering those values for another element. I've also succeeded in making those elements/table field the source of an authority field inside and Authority Object, I even got a checklist with my values as possible solutions inside the authority object (although there were no descriptions), but the same Report that recognizes the Authority Object with the ACTVT field does not recognize the Authority Field I created in another object.
    I've double checked the object and field name, I've also checked that every entry in the Authority Check was upper case. I don't know what I'm missing.

    I was finally able to make it work, I needed an extra table with text descriptions and language to get the description, and I was missing a reactivation of one element and then the reactivation of the whole chain of modifications to make it work.

  • New Enterprise Portal Installation (from zero)

    Hi All.
    I need help to install Enterprise Portal from zero, I need know what portal version is the more recent and the software necessary that I need download.
    Thanks.

    Hi,
    The latest version is SAP NetWeaver 7.3. You can search in SDN or Google to find out the installation guide.
    Check the below links...
    http://www.sdn.sap.com/irj/scn/index?rid=/webcontent/uuid/a0b8a13a-3be4-2d10-5e9c-c2cb707752c6
    https://websmp109.sap-ag.de/~form/sapnet?_HIER_KEY=701100035871000559799&_FRAME=CONTAINER
    Let me know if you need more information.

  • SOA from Zero

    Hello everybody, i am a student very very novice in this matter (SOA), please somebody can give me manual and tutorials about SOA from zero, (beginnign) how implementate, and concept, please is very urgent thanks to all

    Conceptually SOA isn't that difficult and there are many resources available to you.
    However, there is a lot of information out there and randomly thrashing through it may well leave you very confused. Here are some pointers which I hope are helpful.
    A massive driver for SOA has been the onset of Web services and it's supporting standards: WSDL, SOAP, UDDI. Understanding Web services and the benefits they have brought is a good start.
    Look to understand service granularity: Fine grained and course grained.
    Look to understand SOA approaches: Top-down, Bottom-up and Middle-out.
    Then, and more specifically, gain an appreciation of conceptually what an ESB engine is trying to achieve and why a BPEL engine and service orchestration is a good thing.
    Also, in order to understand SOA in some sort of context it might be helpful to look at some "SOA Maturity Models". Many vendors, including Oracle has one. They are all very similar, often just differently represented.
    For an example a company looking at SOA may go through the following steps:
    Step 1: Understand value of SOA
    Step 2: Assess SOA readiness
    Step 3: Identify SOA potential projects
    Step 4: Build a roadmap for SOA adoption
    This site and some Google searches should help enormously with all of these topics.
    Hope this helps
    Regards
    Allan.

  • Yet another Adobe Flash Player zero-day discovered from the Hacking Team breach.

    Thanks for the heads up Symantec Matt. 

    Aaaahhhh yes... remember when an entire day could by without news of a breach or hack or targeted attack? Yeah... neither do I.It will probably shock you all to hear that the Symantec Security Response team dropped a new blog over the weekend outlining a Zero-Day vulnerability in Adobe Flash player. Dig it:Second PoC Exploit for Adobe Flash Player Discovered After the Hackers-for-Hire Company Breach
    Yet another Adobe Flash Player zero-day discovered from the Hacking Team breach.Symantec is aware of a second vulnerability (CVE-2015-5122) in Adobe Flash Player that’s associated withHacking Team, the Italian company which recently suffered a major data breach. The existence of the unpatched vulnerability has been confirmed by Adobein itssecurity bulletin.Symantec’s analysis has confirmed that the vulnerability can be successfully exploited...
    This topic first appeared in the Spiceworks Community

  • HT1338 trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    Disable anti virus software and try turning off the Firewall in System Preferences > Security & Privacy > Firewall.
    Quit then relaunch the App Store. From the menu bar click Store > Sign In
    Then click Store > Check for Unfinished Downloads

  • Search has encountered a problem that prevents results from being returned. If the issue persists, please contact your administrator.

    Hello Guys,
    I am creating resultsource from central admin. If I create it from central admin it works fine. But if I am creating result source from power shell scripts it shows me following error message.
    An exception of type 'Microsoft.Office.Server.Search.Query.InternalQueryErrorException' occurred in Microsoft.Office.Server.Search.dll but was not handled in user code
    Additional information: Search has encountered a problem that prevents results from being returned.  If the issue persists, please contact your administrator.
    Any suggestion ?
    Thanks in Advance.

    Hi,
    Please provide more specific information about the issue. What type of content source you tried creating via powershell?
    Make sure you are using the approproate permission and search service application.
    Here is the reference for creating content resource via script:
    http://technet.microsoft.com/en-us/library/ff607867(v=office.15).aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for