Switch and IIF Functions keep adding values.

Help,
My Report is adding my values with both Switch and IIF Functions.
I have reworked the below Switch expression as an IIF Function, I have used Null and IsNothing in replace of "0", I  have replaced True with Not(Fields!January2014.Value =
"0"). But Unfortunately, no matter what I do in the below syntax it adds my values. The goal is to run a projection either from this
year's numbers or last year's, so if this year's numbers have not been created or equal "0" to use last years. Unfortunately, when there is a this year and there is a last year it is adding those two values. Any ideas? Please provide input.
Thank you,
=Switch(Fields!January2014.Value =
"0",CDbl(Fields!January2013.Value),True,CDbl(Fields!January2014.Value))

What does your IIf statement look like?
=IIf(Fields!January2014.Value="0",CDbl(Fields!January2013.Value),CDbl(Fields!January2014.Value))
How is the January2014 field created in the dataset? And the January2013 field?
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • LabVIEW 7 and NI Switch and DMM function, Won't compile

    After installing labview 7, I get broken arrow for PXI Ni Swich. Error occurs in NiSwitch Initialize.vi when initialzing Switch. The error message indicates: "Call Library Function Node: Function not found in library"

    Thanks for you input. I did installation in the sequence you mentioned but it didn't help. With a help of apps at NI and being on the phone for soooo long, he found out that two dll files called ivi_Switch.dll and ivi_switch_32.dll were listed in VXIPNP\WINNT\bin folder as well as C:\programfiles\ivi\bin. By removing those dll from VXIPNP folder fixed the problem.
    Bottom line is - leave the dll fils in C:\programfiles\ivi\bin as it is!

  • When syncing my iPhone 5 to my Windows XP computer and iTunes is trying to download my apps and it just keep adding up the hours remaing (now up to 5000 hours).  When I try and shut iTunes down it locks my computer up. Any ideas?

    What is up with this?

    In order to get those to work you will have to upgrade to Snow Leopard 10.6.8.
    Start by checking if you can run Snow Leopard:
    Requirements for OS X 10.6 'Snow Leopard'
    http://support.apple.com/kb/SP575
    The OS 10.6 Snow Leopard install DVD is available for $19.99 from the Apple Store:
    http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
    and in the UK:
    http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    but nobody knows for how long it will be available.
    When you have installed it, run Software Update to download and install the latest updates for Snow Leopard, preferably the full 10.6.8 combo updater.

  • How to delete formula from cells and keep the values in Excel VBA

    Hi,
    In my Excel I have 15 columns. In column F which has a formula (INDEX MATCH), it has contains "RECEIVED" and "INTRANSIT". I need to filter the column F for all "RECEIVED" and then remove the formula from cells and
    retain or keep the values that are already in the cells. something tricky and i'm not sure on how to work on this in Excel VBA.
    Below is my initla VBA code:
    I already have the codes on how to filter. kindly please help me on how to do this. thank you in advance.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    Debug.Print rng.Address
    rng.AutoFilter Field:=6, Criteria1:="RECEIVED"
    End With
    Application.creenUpdting = True
    End Sub

    Solved.
    Sub test_Click()
    Dim wb As Workbook
    Dim ws As Worksheet
    Dim rng As Range
    Dim lrow As Long
    Dim rRec As Range
    Dim btField As Byte
    Set wb = ThisWorkbook
    Set ws = wb.Sheets("Intransit_")
    btField = 6
    Application.ScreenUpdating = False
    ws.AutoFilterMode = False
    With ws
    lrow = .Range("F" & Rows.Count).End(xlUp).Row
    Set rng = .Range("A1:R" & lrow)
    With rng
    .AutoFilter Field:=btField, Criteria1:="RECEIVED"
    On Error Resume Next
    Set rRec = .SpecialCells(xlCellTypeVisible)
    On Error GoTo 0
    End With
    .AutoFilterMode = False
    If Not rRec Is Nothing Then
    With rRec
    .Columns(btField).Value = .Columns(6).Value
    End With
    End If
    End With
    Application.ScreenUpdating = True
    End Sub

  • How to call procedure inside a procedure and need to sore the value in a variable?

    HI ALL,
    i am usung oracle 11g.
    here is my package and procedure
    i want  to call get_email_details this procedure inside the process_email_master and want to keep the value inside a varible in master procedure
    create or replace
    PACKAGE        ms_gen_process_email
    as
       type email_type is record(subject                            varchar2(4000 char),
                                 email_body                       varchar2(4000 char),
                                 to_receipent                    varchar2(4000 char),
                                 cc_receipent                     varchar2(4000 char));
        type email_type_table is table of email_type;
       procedure process_email_master(
          p_metric_name     IN   VARCHAR2,
          p_current_stage   in   varchar2,
          p_action          in   varchar2,
          p_pid             in    number,
          P_OBJECT_ID       in    varchar2
          --p_emai_master     out   p_email_type_table
       PROCEDURE get_email_details (
          p_metric_name     IN   VARCHAR2,
          p_current_stage   in   varchar2,
          P_ACTION          in   varchar2,
          p_email_type_table1 out email_type_table
    END ms_gen_process_email;
    create or replace
    PACKAGE BODY        ms_gen_process_email
    as
        procedure process_email_master(
          p_metric_name     IN   VARCHAR2,
          p_current_stage   in   varchar2,
          p_action          in   varchar2,
          p_pid             in    number,
          p_object_id       in    varchar2
          as
          begin
          null;
           EXCEPTION
          WHEN OTHERS
          then
             null;
          end process_email_master;
       PROCEDURE get_email_details (
          p_metric_name     IN   VARCHAR2,
          p_current_stage   IN   VARCHAR2,
          P_ACTION          in   varchar2,
          p_email_type_table out email_type_table
       as
       BEGIN
          select subject, email_body, to_receipent, cc_receipent
           bulk collect into p_email_type_table
                    from ms_gen_email_config_detail
           WHERE email_key = (
                    SELECT email_key
                      FROM ms_gen_email_config
                     WHERE metric_name = p_metric_name
                       AND action = p_action
                       and current_stage = p_current_stage
          for i in p_email_type_table.first..p_email_type_table.last loop
          dbms_output.put_line(p_email_type_table(i).subject||p_email_type_table(i).email_body||p_email_type_table(i).to_receipent||p_email_type_table(i).cc_receipent);
          end loop;
       EXCEPTION
          WHEN OTHERS
          THEN
             NULL;
       END get_email_details;
    END ms_gen_process_email;
    but i am getting this error
    Error(15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared
    Regards
    Damby

    If you need to call a procedure which has yet to be defined in your package, you can use forward declaration...
    That means that you declare the procedure/function before the place it's going to be called (typically people do this at the top of the package) without providing a body for the code...
    PACKAGE BODY        ms_gen_process_email as
       PROCEDURE get_email_details
          p_metric_name     IN   VARCHAR2,
          p_current_stage   IN   VARCHAR2,
          P_ACTION          in   varchar2,
          p_email_type_table out email_type_table
       ); -- Forward declaration of get_email_details procedure
        procedure process_email_master(
          p_metric_name     IN   VARCHAR2,
          p_current_stage   in   varchar2,
          p_action          in   varchar2,
          p_pid             in    number,
          p_object_id       in    varchar2
          as
          begin
          null;
           EXCEPTION
          WHEN OTHERS
          then
             null;
          end process_email_master;
       PROCEDURE get_email_details
          p_metric_name     IN   VARCHAR2,
          p_current_stage   IN   VARCHAR2,
          P_ACTION          in   varchar2,
          p_email_type_table out email_type_table
       ) as

  • Apps keep adding themselves back onto icloud backup

    Really annoying problem because ill get emails from icloud saying the backup is almost full , upon checking the backup page and what apps are backed up . I keep finding that my winzip app , adobe reader, and another app keep adding themselves back onto the list despite me constantly selecting them off. The third app collects some 800 mb of data but none of it is needed to be backed up since its all profiles and stuff.
    Any solutions?

    Apps are NEVER backed up to iCloud. Neither is Music or Videos. So Apps are not what is taking up your iCloud storage.
    Apps, music and videos don't need to be backed up, because they can be downloaded again any time they are needed.

  • Analytical View - Substring function and Other functions.

    Hello All
    I am trying to use substring and trim function for a value/string and get the field value from position 6 - 10. in analytical view.
    Example: Field name XYZ (Values showing as: ASDFG GETVALUENW  2345) --> (data type :22 VARCHAR)
    Output must be : GETVALUENW (which is 10 characters, from position 6 after trimming) which I am wring to new filed in Calculated coloumns.
    Trying the use built-in functions but syntax wise missing some thing need your inputs.
    Regards
    Kiran.

    Hi Kiran Avunuri,
    A small thought process.
    Have you tried something similar(syntax) in your view.
    BR
    Prabhith

  • Expression question: keep adding to value

    Hi!
    I want to animate the cameras z-position based on an audio track. I have converted the audio to keyframes, but now I'm stuck trying to figure out how to feed the audio peak values to the cameras z-position so that they keep adding to each other.
    Simply linking the camera z-position to the keyframe data will make the camera fly back and forth, but I need it to keep going forward in a pulsating motion. So when there is a peak in the audio amplitude, the camera moves more rapidly forward and when there is a flat waveform the camera stays put or moves only slightly.
    Is this possible to do?

    This Position expression should work. Adjust mult to set the sensitivity (how much it moves in response to the audio) and minVal to set how much it moves when there is no audio.
    mult = 10;
    minVal = 5;
    L = thisComp.layer("Audio Amplitude");
    aud = L.effect("Both Channels")("Slider");
    accum = 0;
    for (f = timeToFrames(inPoint); f <= timeToFrames(); f++){
      accum += Math.max(aud.valueAtTime(framesToTime(f)),minVal);
    value + [0,0,accum*mult]
    If you have separated the Camera's dimensions, change the last line to this to make it suitable for Z Position:
    value + accum*mult
    Dan

  • Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    Hi, how can I limit the number of emails I can see on my iPhone 5. Every time in delete one and older email gets added from my live.co.uk account (where I want to keep my 2500 emails) I just don't want many on my phone. Thanks

    You can't. Why on earth would you attempt to manage 2500 emails with setting up a folder structure or some means of doing so? Simply keeping them in an single inbox is not realistic, no matter what email client you use.

  • I just got a new iphone 4 for att and my friend installed the sim card in it for me. the imessage function isnt connecting with the my cell number. a while back i had logged into my apple account on someone elses cell phone and their number keeps showing.

    i just got a new iphone 4 for att and my friend installed the sim card in it for me. the imessage function isnt connecting with the my cell number. a while back i had logged into my apple account on someone elses cell phone and their number keeps showing. when i try to just select my number to send and recieve imessages from it will not show up. i can send and recieve regular text but not pictures or imessage. i have tried logging off and restarting and nothing has worked.help please!!

    Did you remove your account information from the other person's iPhone?

  • How to switch off scroll and zoom functions of touchpad on Satellite L

    Hi.
    Can anyone tell me how to switch off the scroll and zoom functions for the Synaptics Touchpad v7.2 .
    Can't seem to do it via the Control Panel.
    Any suggestions.

    Hi buddy,
    > Can't seem to do it via the Control Panel.
    You can only disable the virtual scrolling function if the touchpad driver is installed properly. The driver provides extended functions and allows you to disable/enable special features. If you dont have installed the touchpad driver download it on official Toshiba page:
    http://eu.computers.toshiba-europe.com > Support & Downloads > Download Drivers
    Then navigate to control panel as the previous user wrote for disabling the scroll function.
    Can you find it now?

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

  • Calling functions and inserting tables based on values entered

    Hello Everyone,
    I am creating a function as below:
    create or replace function func(flags in number,Ctry in varchar2) return number
    is
    maxv number;
    flagv number;
    begin
    flagv:=1;
    select max(num) into maxv from A;
    if flags =1 then
    insert into A(num,nam) values(maxv+1,Upper(Ctry));
    else
    flagv:=0;
    end if;
    return flagv;
    end;
    The function takes two parameters-The first one will be either 0 or 1.The second one will be name of a country.
    If the first parameter is 1 then we would insert the country name passed, to the table name A.If its 0 then no insertion occurs and the function would return a value 0.
    On compiling the function I get a success!.
    When I do a
    SQL>select distinct func(0,'UK') from B;
    it works well and returns 0
    However when I do
    SQL>select distinct func(1,'UK') from B;
    I expect an output of 1 & also expect UK to be inserted as anew row in the table A.However It throws an error saying "ORA-14551: cannot perform a DML operation inside a query .."
    It is very important for me to use select to call the function, as my application would fire a select with that function and based on the value entered would insert or not insert at the back end.
    Is there any way out to do this??
    variable temps number
    exec :number :=func(1,'UK');
    does work but I cant use this in my application.
    Hope you can help! Thanks!

    create or replace function func(flags in number,Ctry in varchar2) return number
    is
    PRAGMA AUTONOMOUS_TRANSACTION;
    maxv number;
    flagv number;
    begin
    flagv:=1;
    select max(num) into maxv from A;
    if flags =1 then
    insert into A(num,nam) values(maxv+1,Upper(Ctry));
    COMMIT;
    else
    flagv:=0;
    end if;
    return flagv;
    end;
    Is the above changes in BOLD enough or I need to do something else too in order to incorporate the autonomous transaction??
    I am not too familiar with autonomous transaction.Could you please suggest the changes I need if any more required??
    Thanks a ton for your suggestions!
    Message was edited by:
    user579245
    Message was edited by:
    user579245

  • Wifi and bluetooth function cannot switch on

    My phone cannot switch on the bluetooth and wifi function. Already try restore factory setting. Still cannot on. My phone had drop before this but that time nothing happen just crack behind.. 2 month later just suddenly the bluetooth and wifi function cannot switch on at all.

    You should contact your local sony team:
    http://www.sonymobile.com/global-en/support/contact-us/
    All we have to decide is what to do with the time that is given to us - J.R.R. Tolkien

  • Does anyone know why my iphone keeps switching all of my alert tones and ringtones assigned to contacts? i restored it and it still keeps doing it and now when ever i get a txt or a phone call the tones just sound terrible. how do i fix this?

    does anyone know why my iphone keeps switching all of my alert tones and ringtones assigned to contacts? i restored it and it still keeps doing it and now when ever i get a txt or a phone call the tones just sound terrible. how do i fix this?

    Your only chance is setting it up as new device without using the latest backup afterwards, which you already did.
    If this does not work, you should get it serviced:
    Apple - Support - Service Answer Center
    How to back up your data and set up as a new device

Maybe you are looking for