Simple quest on conditonal statements in formula

Hi everyone,
I just wanted a simple information. I have three key fig f1 f2 & f3 and i want a formula to check
if f1 is empty then
formula = f3-f2
else
formula = f3-f1.
Just wanted to know if this could be done in a formula or will i have to write some kind of exit?
Thanks
Warm Regards,
Akilesh

Hi Akilesh,
  You can do this in formula of query designer. Write the following for your formula:
( F1 = 0 )( F3 - F2 ) + ( F1 <> 0 )( F3 - F1 )
   Actually it is using boolean operator.
   Assign points if helpful.
Regards,
Aaron Wang

Similar Messages

  • IF statement in Formula Node

    I have the following statement in a Formula Node in LabVEW 7.1:
    if (x=1) y = 3; else y = 1;
    When running the VI, whatever the value of X is, I obtain Y = 3 !!!!
    Why ???
    Tom

    Try x == 1 (instead of x = 1).
    Using LV8.0
    Don't be afraid to rate a good answer...

  • If-then statement in formula node

    **Note - The attached file shows the current block diagram.
    I have a formula node inside a for loop. Inside the formula node I am trying to program the if-then statement:
    If T1<2.0E-5 OR T1>5.5E-4 THEN GOTO 3
    U7=U7+V
    I have 4 items I need help with:
    (1) Is 'II' the correct operator for 'OR'?
    (2) Is 'goto' an acceptable operator within LabVIEW?
    (3) 'U7' is building a 1D array. How do I need to define it? Is it simply 'int U7'? Also, I will add an output value named 'U7' on the formula node wall with an indicator wired to it from outside the for loop.
    (4) Is my use of the equal sign appropriate or do I need to use '=='?
    Thanks for the help.
    Philip
    Attachments:
    if-then_in_FN.jpg ‏18 KB

    Thanks for the help. I went ahead and rewrote the program so I could omit the 'goto's. Another problem that I am having is that I want 2 statements for 1 assignment:
    if (T1>=.002004 && T1<=.002584)
    B1=U
    A1=V;
    I want to assign both B1 and A1 values when the above condition is true. I tried a comma between the U and A1 but it doesn't work as well. Should I define A1 and B1 separately? Or would this create problems?
    if (T1>=.002004 && T1<=.002584)
    B1=U;
    if (T1>=.002004 && T1<=.002584)
    A1=V;
    Thanks,
    Philip

  • Syntax and format of a IF statement in formula XPath in a InfoPath field

    Good day
    I needed assistance with IF statement syntax in a InfoPath field formula.
    If Field_1 = null
    concat(substring-before(txtComponentNo1, "."), ".", substring-before(field17, "."), ".", substring-after(field17, "."))
    Else
    concat(substring-before(txtComponentNo1, "."), ".", substring-before(field17, "."), ".", substring-after(field17, ".")+1)
    or in Advance XPath
    If Field_1 = null
    concat(substring-before(../../../my:grpComponent_1/my:grpComponent1/my:txtComponentNo1, "."), ".", substring-before(../../my:field17, "."), ".", substring-after(../../my:field17, "."))
    Else
    concat(substring-before(../../../my:grpComponent_1/my:grpComponent1/my:txtComponentNo1, "."), ".", substring-before(../../my:field17, "."), ".", substring-after(../../my:field17, ".") + 1)
    Thanks

    Hi,
    Here is the good explanation of what you are looking for.
    http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx
    and please check this as well for basic understanding
    http://www.bizsupportonline.net/infopath2010/if-else-statements-conditions-rules-infopath-2010.htm
    Krishana Kumar http://www.mosstechnet-kk.com

  • Giving OR Statement in formula evaluates only one condition

    This is the formula I used in the reports record selection. I need to display the records in division number = 9 and division number = 20 and need records where other field top account = true as well in the reports. But it displays only first condition and not the second condition. The reason might be it checks for true for the first field and it ignores the second condition.
    ({Opportunity.Division Number} in ["09", "20"]) or {Opportunity.Top Account} = true
    I can't use and statement here, because I need records for all the conditions.  However it works in select query in oracle but not in crystal report.
    Let me know if there is any alternative.

    As Raghavendra.G suggests, if {Opportunity.Division Number} is null, the formula will not work as expected.  Crystal halts execution of any formula whenever it encounters a null value - unless it is enclosed in the IsNull() function.  It does sound like that is what your problem is, as the condition is correct for what you are trying to do.
    Perhaps you need to change the condition to:
    ({Opportunity.Top Account} = true) or {Opportunity.Division Number} in [09,20])
    (assuming the issue is a null Division Number...)
    HTH,
    Carl

  • "Count" Statement IN Formula

    Post Author: LHooker
    CA Forum: General
    I would like to create a report that creates totals for each individual salesman (Group #1). The criteria is determine by a "LIKE" statement (i.e. LIKE "Port"). I need the total amount and the number of records for each salesman. I tried to do this in a fomula, but can't seem to get the right total for the number of records.  It's counting every record. How can I count the number records that meets the specified criteria ? Below is an example of the formula for counting the number of records:
    If ({itemtype.Description} like "Port") ThenCount({itemtype.Description})

    Post Author: SKodidine
    CA Forum: General
    You could try it with a running total.  Count on {itemtype.Description} and for evaluate, use a formula and type {itemtype.Description} like "Port" and Never Reset.  See if that will work for you.

  • Simple doubt in select statement

    hi all,
    Although this is a very simple ques.
    Can u pl tell me why i m not getting the value into v_adrnr ?
    Chk the following code.
    V_VBELN  = '0080000001'.
      SELECT SINGLE ADRNR
             FROM VBPA
             INTO V_ADRNR
             WHERE VBELN = V_VBELN
             AND   PARVW = 'BP'.
    i have cheked the table vbpa for the above mentioned conditions.I can see the
    value for adrnr in database as 0000022741.
    But while i run the above code i cant see value on v_adrnr.
    Pl help.

    First PARVW has a domain with a conversion routine based on table TPAUM so "BP" is internal code "RE"
    Use CONVERSION_EXIT_PARVW_INPUT
    CALL FUNCTION 'CONVERSION_EXIT_PARVW_INPUT'
      EXPORTING
        input = V_PARVW
      IMPORTING
        output = V_PARVW.
    Second
    Have you defined V_VBELN with reference to the element VBELN, char 10 with conversion Alpha
    Then it should work
    Regards

  • Formula to deduct one cell from another cell - simple equation - cant find the answer, formula to deduct one cell from another cell - simple equation - cant find the answer

    Could anyone tell me how to deduct one cell from another cell in the numbers application.
    Thank you!

    to subtract one cell from another you enter a formula in a cell by:
    1) click the cell where you want the result to be
    2) click the cell that contains on of the operands
    3) type the minus sign ("-")
    4) click the other cell with the other operand
    e.g.  if cell A1 contains 5, cell B1, contains 2 and you want the difference of those two cells to be in cell C1....
    you would click cell C1 and then type: "=A1-B1" then type the enter key OR
    click cell C1 and then type "=", then click cell A1, then type "-", then click cell B1, then type the "enter" key

  • X-FI simple questi

    OK im looking to update my old audigy 2 value as i would like to. One question i have is on the X-FI XtremeMusic (as i take it its the same as all the higher end cards minus the li've dri've ...) on the XM can you turn sets of speakers off. The reason i ask is i would like to?do a 3. setup (front left, front center, front right). I know i could easily run the card in a 5. mode and not run rear speakers but this would yeild a really weird sound feild when playing games.... as there would be no way to reproduce the rear sounds. The question i have is on the X-FI xtrememusic can i run in a true 3. (4 seperate discrete channels)?not just a 5. with muted rear speakers?ThanksBen

    OK im looking to update my old audigy 2 value as i would like to. One question i have is on the X-FI XtremeMusic (as i take it its the same as all the higher end cards minus the li've dri've ...) on the XM can you turn sets of speakers off. The reason i ask is i would like to?do a 3. setup (front left, front center, front right). I know i could easily run the card in a 5. mode and not run rear speakers but this would yeild a really weird sound feild when playing games.... as there would be no way to reproduce the rear sounds. The question i have is on the X-FI xtrememusic can i run in a true 3. (4 seperate discrete channels)?not just a 5. with muted rear speakers?ThanksBen

  • 3 simple questi

    . Is the only difference between the Zen Micro and the Zen micro Photo:the photo option/display ( and maybe storage capacity)
    2. Does the Zen Micro also got the 'bookmark'option, like the Photo version.
    3. Does the Zen Micro and Micro Photo both remember last stop position after connecting to PC or Charging, or is is lost after that?
    4. What do I see on display if a Mp3 haven't got a id3 tag?Message Edited by basics on 07--2006 :26 AM

    basics wrote:Thanx for replies!About renaming id3 tags:I've got very much (older) files without id3 tag and some podcasts also doesn't use this..So, this is not as simply as you mentioned.. That's the reason of my question...
    Message Edited by basics on <SPAN class=date_text>07--2006 <SPAN class=time_text>:40 AM
    Your welcome. And Im not completely sure, I have never heard of this case. But it seems like the Microphoto has everything else you want.
    Good luck!

  • Firmware update for Zen Xtra, a simple quest

    Hello,
    I have purchased my zen xtra on July. It works just fine. When i go to "about" in the menu to see the player's version it says .03.02. I don't know if i need to upgrade the firmware because nomad's page for upgrade provides a firmware with same number: Creative NOMAD Zen Xtra firmware update version .03.02
    Does it mean i already have the latest firmware version in my player or do i still have to upgrade it's
    Thanks!
    Al

    Alrichi,
    If your player already showing the exact same firmware version as with the download then you would already have the same firmware version. You do not need to update again.
    Jason

  • Zen Touch simple quest

    Hello.
    I've just bought a Zen Touch and after 4 hours charging it the blue led of the power button stopped blinking and the battery icon on the display stopped showing. Is that OK?
    The manual says we should see if the battery is fully charged by checking the battery icon.
    Thanks in advance.
    Murilo

    Actually I think it trickle charges for another 30 minutes, so to get the top performance from the battery you might want to leave it another 30 minutes (Creative, can you confirm this?).
    More battery advice here.

  • Alerts not working when formula is in the cell

    I am having a problem where my alerts are not working in the preview mode.  They work fine when I hard code the alert range.  But I need the alert to change under differnt conditions and I am using an IF statement
    the formula is simple
    =IF('TXF Inputs'!D27=3, C34/2, C34)
    output is either 0.375 or 0.375/2 = 0.1875
    if i hardcode the cell with either of these values the alert works, but it does not work with the formula.  The confusing part is that I have other alerts that have IF statements in them and they all work.
    They also work fine in the main screen, ie it shows yellow if my default values =0.1875, but then when I preview or publish they don't work
    bw

    Can u give us the details like which component you are using for alerts.

  • "If" in Formula in Bex

    Hi ,
    I want to create a Formula in which I want to assign a value to a KF if a condition is satisfied... Any advise on how to write "If" statement in Formula in Bex
    ex:
    if char1 = "xyz" then KF = 0
    Any help...

    hi tanu,
    First of all we cant bring char into formula for that you need to use formula varaible with replacement path..to make char as a KF
    http://www.sd-solutions.com/SAP-HCM-BW-Replacement-Path-Variables.html
    one that brough into as KF then you can write simple If like below
    (( KF == 'xyz' ) * 0 + KF ) 

  • Member Formula: IF ... ELSE do outline aggregation

    Hi experts,
    How to write a formula for a parent entity member like this:
    IF (@ISMBR("Account member"))
    do something
    ELSE
    do default outline aggregation from its descendants
    ENDIF
    Because I just want the "Do something" execute for some account member. If there is not ELSE statement, the formula will override default outline aggregation. The problem is I can not find any function that manually do default aggregation.
    Please ask if my question not clear.
    Many thanks!

    Huy Van
    I tried to replicate it in Sample Basic, I loaded sample data and below is the result
         Cola     Actual                              
         East     East     East     East     New York     New York     New York     New York
         Sales     Margin     Profit     Measures     Sales     Margin     Profit     Measures
    Jan     1812     1213     837     837     678     407     262     262I've a script where I've fixed on East (Parent member of Market)
    FIX(East,Actual,"100-10")
    Jan(
    IF(@ISMBR(Sales))
    100;
    ENDIF)
    ENDFIXBelow are the results after running the script
         Cola     Actual                              
         East     East     East     East     New York     New York     New York     New York
         Sales     Margin     Profit     Measures     Sales     Margin     Profit     Measures
    Jan     100     -499     -875     -875     678     407     262     262I don't see anything else changes (Only Sales of East is changing).
    Now that you are writing to Parent member, then aggregation from Parent1's descendants will overwrite what you script just populated.
    Regards
    Celvin
    http://www.orahyplabs.com
    Please mark the responses as helpful/correct if applicable

Maybe you are looking for

  • How do I print pictures to be 3 by 5 or 2 by 3? I had those choices in the earlier version of iPhoto.

    With the older version of iPhoto there was a pull down menu of sizes to print. I would like to print 3x5 or 2x3 rather than the larger sizes. Is it possible to do this any more? If not is it possible to uninstall this version of iPhoto and go back to

  • Tired of a game and want to sell it?

    Suppose you buy a game and you get sick of it. You're thinking, "Hey maybe I'll sell it to my mate across the road". Guess what,... you can't. It's not like a game you purchased for your PC or Mac and you sell it to one of your friends or on Ebay. Th

  • Some Images Not Showing on Server

    Five of my images aren't showing up online. They appear fine when previewed on my computer and even appear in Adobe Browser Lab. I've re-uploaded them several times. I've deleted them from the server before re-uploading them. I've created new ones an

  • Using CCC for the upgrade to Leopard

    I know this has been covered a lot, but I want to make sure I'm getting it right. I have used Carbon Copy Cloner to make a bootable clone of my system. Everything is there. I plan on doing a Erase & Install of Leopard. At what point during the instal

  • Not able to view the created respository in ACS server

    Dear All, I am not able to restore the taken backup & even it is not showing me option which is disabled in GUI. I have tried to restore the same though CLI. But i am not able to view my created backup repository. Below is the command which i used; M