Problem in formula

Hi all,
I am writing formula in query designer.
when i want to do conditional calculation
short of like this
(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (NOT (Actual Costs > Plan Costs)) * Actual Costs
but when i write this formula
(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation)  till this part i am getting result
but after this when i write plus sign and logical not  then other part it throws the
error... exception contact your administration...
and also
http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm
from this link
i also found the other way to write this formula
(Actual Costs > Plan Costs)* (Plan Costs + Plan Deviation) + (Actual Costs <= Plan Costs) * Actual Costs
but when i write the same formula... it adds the value because of plus sign...
not satisfy the if else condition.. is it plus sign is different here... or it is other operator
can u guide me

Hi Naman,
In this:
((Actual Costs > Plan Costs)* (Formula1) )+ ((Actual Costs <= Plan Costs) * Actual Costs)
your IF is (Actual Costs > Plan Costs) and the ELSE is (Actual Costs <= Plan Costs)...the Actual Cost can be > than the Plan Cost OR Actual Cost will be <= Plan Cost.
Hope this helps...

Similar Messages

  • Problem with formula variable

    HI,
    I am facing problem with formula variable with replacement path. my requirement is system date - posting date.
    here i created 2 formula variable one is system date. second formula vaiable with replacement path is posting date. second formula vaiable not populating data. please help on that.
    regards,
    kris

    Hi,
    here is some idea.. here i have taken expample dates 1)notification creation date and 2) notification completion.
    1st:in the query designer at key figure coloumn create
    one local formula.in that local formula create formula
    variable with replacement path.in that take reference character
    notification completion.in the next tab take replace ment
    as key.in the last tab select "date".
    2nd: do the same thing for the notification creation date.
    3 rd : create 3 rd local formula and do the substraction
    for the first 2 local formulas.
    4th:create codition on the difference which u have find with
    on that condition u can create one user entry varibale.
    5th:while u defining the query put these 2 dates,i,e
    notification completion, notification creation date in the character block.
    If not system will ignore the formula variable which u created in
    above steps.
    Hope this wil help u.
    regards....KP

  • Problem with formula in the query

    HI ,
    In cube I have 2 fileds EU date and US date .
    For example :
    In cube EU date  =07/02/2008
               US date = 23/02/2008
    In the query we have a formula with these 2 fields
    formula is DUE date =  DATE ( ( 'Enter 1 = US; 2 = EU - Asia' == 1 ) * 'Due date US' + ( 'Enter 1 = US; 2 = EU - Asia' == 2 ) * 'Due date EU' )
    In the varaible screeen we have a '"Enter 1 = US; 2 = EU - Asia' == 1"
    So if u enter 1 it takes EU date and display as due date if u enter 2 it take US date and display as due date.
    Problem is :
    When we give  "'Enter 1 = US; 2 = EU - Asia' == 1"---this value 2
    in the report in some cases we get due date as 02/07/2008 instead of 07/02/2008. This is not for all records only few we get like this . and for US  due date this problem  is not there.
    Please suggest what might be the problem.

    Hi,
    Please check again the cell value because it may contain correct value but display may be different.
    You can apply the common display property fot the whole column using the workbook properties and saving the workbook.
    Regards,
    Anil

  • BW - problem with formula variable (date format)

    Hi,
    (sorry if I'm using different term than yours.. this is my 2nd query.. still new with BW)
    I need to create 1 query: Support Message Aging Report.
    Basically it will have 5 columns: Not Due, 0 Day, 1 Day, 2-10 Days, >10 Days.
    and 1 input selection is: key date.
    the formula is: number of aging day = key date - due date.
    I have no issue on the 1st and 2nd column. For that I just create 1 customer exit.
    My problem is on how to separate the over due support message by day (due date < key date).
    I tried create 2 formula variable for key date and due date. Then from these 2 vars, I can get the number of days.
    Problem comes when the calculation is cross month/year. I suspect maybe because the return from the formula var is in number format and not date... yyyymmdd. Then, I change the dimensions from number to date.. it is working for key date.. dd.mm.yyyy.
    but for the due date, I got problem... it keeps give me warning saying: value 'D' invalid for property dimension of element etc.///
    below are details for both formula variable.. please advice which area should I fix or maybe you can suggest any good idea for my query.. thanks so much
    1. ZKEYDATE - customer exit (value  input data) - dimensions date - NO ISSUE (OUTPUT: dd.mm.yyyy)
    2. ZDUEDATE - replacement path (ref char ZBW02C08) - replacement rule: infoobject, key - dimension date - GOT WARNING...
    ZBW02C08: contains due date and the type is date: yyyymmdd

    If I were you, I'd try two things:
    best way - have the infoprovider changed to have a new key figure for the number of days difference
    - to do this with formulae (especially crossing months and years - what about leap years) is hard to maintain and develop
    other way - make a virtual key figure - i did this once but I forget how exactly. There's a userexit or BADI somewhere which can be used for this.
    Either of these ways allows the calculation to be done in ABAP itself where date1 - date2 gives you the number of days difference.
    By the way though, this is in the wrong forum. I'd bet if this was in a BI forum, you'd have an answer already.

  • Problem Iif formula. MDX dimension formula

    Hi experts,
    I have a quite problem with tolerance in validation rules. When user tries to change Workstatus, system don't let it, because it detect that validation account is not equal to zero, however value of this account seems to be zero.
    I know tolerance doesn't works fine on 7.0 MS version. Because of this we are trying to create an MDX formula on dimension account, but system give us this error.
      - [CUENTA].[H2].[#X000] Parser: The end of the input was reached.
    Our Dimension AccountL (Cuenta) has 3 hierachies. BLOQ_FASEC member is a parent member which sum all validation account.
    We are trying to introduce a formula in other account member, giving to this one a tolerance.
    Formula introduced is this one:
    Iif(Cuenta.H2.BLOQ_FASEC < 0.5 and Cuenta.H2.BLOQ_FASEC > -0.5,0,Cuenta.H2.BLOQ_FASEC)
    Could you help us?

    Hi again,
    Just to be on the same page...
    - You have 3 hierachies in your Excel dimension file  (PARENTH1, PARENTH2, PARENTH3)
    - You have 3 Formulas columns in your Excel dimension (FORMULAH1, FORMULAH2, FORMULAH3)
    - What I would like to know is, what are the dimension properties assigned to your dimension (Admin console --> Maintain dimension properties...). Here, you should ONLYhave one FORMULA dimension property assigned, even using multiple formula columns in you Excel file.
    Then, if you setup that in that way, this is correct... But you should write your dimension formula only in FORMULAH2 column.
    In fact, you cannot mix members from hierarchy 1 to calculate a member for hierarchy 2 for example. So, in one hierarchy you can just use members from that hierachy. Can you confirm that?
    Then, could you also confirm that all your dimension formulas are using the correct syntax (WITH BRACKETS)..
    Example: "&#91;Cuenta&#93;.&#91;H2&#93;.&#91;BLOQ_FASEC&#93;"...
    Best Regards,
    Patrick

  • Language problem in formula

    Hi,
    I have a formula where i want to calculate how old someone is. I've a Dutch Windows and a Dutch Microsoft Office 2013 package, but when i put an 'J' (JAAR) in the formula it doesn't work. When i put an 'Y' (YEAR) in the formule it does work. The rest of the
    formula is in Dutch and works. I believe i checked everything i could to turn the language to Dutch, but it still doesn't work. Any suggestion?
    Kind regards,
    Jochem van Leur

    Are you using the DATUMVERSCHIL (DATEDIF in English) function? This is an undocumented function, and the only date/time function that doesn't accept localized arguments: you
    must use "y" in all languages, instead of "j" in Dutch, "a" in French etc.
    See International Worksheetfunction problems by Excel MVP Ron de Bruin.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Problem in formula during transformation.

    PFA the snapshot of the problem..
    http://img122.imageshack.us/my.php?image=problemwy7.jpg
    I have two Infoobjects in the infocube, which are formulas based on the other infoobjects.When i'm trying to create a transformation for them,im facing these errors.
    The flag condition is that if revenue is greater than 50000 , it should be made 1.
    The profit percentage condition is that it is calculated by profit/revenue.
    Can u please help me on this ? its kinda urgent !
    Message was edited by:
            snehith allamraju

    On your screenshot, it rather looks that the problem comes Rules 4 and 5, which are (as their error description shows it) Profit and BudgetedProfit.
    As it has been told previously in this thread, as well as in the error message, you probably need to assign a source unit.
    Hope it helps,

  • Array index problem in formula node

    dear friend
    I'm trying to use formula node to solve a problem because I make this program using c at the begining.
    It runs perfectly in turbo c, but somehow it doesn't work in the formula node.
    I try to debug my source code, and I find that the formula node seems can't read the true value in
    the array.
    Here is the code in the formula node.
    int32 i,j,k;
    for ( i = 0 ; i < sopa; i++ )
     j = 1;
     ep[i][0] = pa[i];
     ep[i][1] = np[ep[i][0]][0];
     while ( ep[i][j-1] != exit )
      for ( k = 0 ; k < sonp ; k++ )
        if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
          ep[i][j] = np[ep[i][j-1]][k];
      j++;
    This is the part that I think the problem might be.
    if ( np[ep[i][j-1]][k] != -1 && (pc[ep[i][j-1]][ep[i][j]] + pc[ep[i][j]][exit] >= pc[ep[i][j-1]][np[ep[i][j-1]][k]] + pc[np[ep[i][j-1]][k]][exit] ) && (pc[ep[i][j-1]][np[ep[i][j-1]][k]] == org[ep[i][j-1]][np[ep[i][j-1]][k]] ))
     ep[i][j] = np[ep[i][j-1]][k];
    I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
    Could someone tell me why I get -1 in the array?
    I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
    seems very hard to wire in labview. Could someone give me some good advices of doing this?
    Thanks for your help

    altenbach 已寫:
    normanshi wrote:
     ep[i][0] = pa[i];                                          (A)
     ep[i][1] = np[ep[i][0]][0];                            (B)
    ...    if ( np[ep[i][j-1]][k] != -1 && ... )          (C)
          ep[i][j] = np[ep[i][j-1]][k];                       (D)
    I state that "np[ep[i][j-1]][k] != -1" but I do get the value -1 in the array "ep".
    Could someone tell me why I get -1 in the array?
    I hope I can finally do it all by labview not using formula node,but array like "pc[ep[i][j-1]][np[ep[i][j-1]][k]] "
    seems very hard to wire in labview. Could someone give me some good advices of doing this?
    There are many possible scenarios to get a -1 in the ep output. For example if the -1 gets already written in step (A) or (B) at a certain index, and that index does not get overwritten in step (D). You are indexing all over the place! Is there some bounds checking on the array contents? What are typical inputs and array sizes?
    I'm sure about that the -1 doesn't get already written in step (A) or (B) because ep[i][0] and ep[i][1] is fine. What really makes me confuse is that sometimes ep array has the value like this.
    That means it does overwritten some value in step (D). The -1 should never be written into it because I have already state that np[ep[i][j-1]][k] != -1. Somehow I still get -1,and this is really strange! I'm indexing all over the place becuase I can't figure out a better way to achieve my requirement.
    I think I should briefly tell you what I'm trying to do. In this program,I input some values which means the distance from one point to another. Then I use floyd's all pairs shortest-path algorithm to find all the shortest distance. Finally I want to find out the "shortest path". I mean like from point 4 to point 0,the shortest path might be like 4 -> 2 -> 1 -> 0, and what the formula node part do is trying to find out this "shortest path". Maybe you can give me some better advice of doing this, I have been thinking a better way to do it for about two months. I think I'm really not good at this.
    I try to do it all by labview ,but again I get a strange problem. This time the ep[i][j-1] doesn't get the correct value. In the first time i=0 j-1=0 ep[i][j-1] = 1,but the second time i = 0 j-1 = 1 ep[i][j-1] = 0. This makes the "ep[i][j-1]!=exit" get the incorrect boolean value. The ep[i][j-1] should be 2,not 0. I try to use highlight to find if I make any mistake, but I can't one.This is the input and I put the labview program in attached file (temp4.vi).
    Could you help me find out why this happened?
    Thanks for your help altenbach!
    由 normanshi 在 08-19-2006 10:06 PM 上編輯的訊息
    Attachments:
    temp4.vi ‏191 KB
    ep.jpg ‏10 KB
    input.jpg ‏9 KB

  • Problems with formulas

    Although I have had much experience with spreadsheets in Excel and Quattro Pro, I am having problems creating a valid formula in Numbers '09.
    =sum(tablename :: f2:f7)/cellname_f11 gives me a valid answer in % of 43.32%
    =(cellnamef8*0.6666)/cellnamef11 gives me a valid answer of 11.39%
    But the following formula gives me an erroneous answer:
    =sum(tablename :: f2:f7)+(cellnamef8*0.6666)/cellnamef11
    The percent returned is: 31,039,149.90%, whereas it should be about 54%
    A similar formula in Quattro Pro gives a correct answer:
    (e2e3+e4+e5+e6+e7(e8*2/3))/e11
    I really would appreciate your help on this, as I am trying to move spreadsheets to Mac and Numbers '09.
    BobDuluth

    Bob,
    I think if you could go back and try your expression in Quattro Pro again, you'd get the same answer that Numbers did with that expression. It's a standard practice in math, since long before computerized spreadsheets, to do the multiplication and division before doing the addition and subtraction, unless over-ridden by parentheses.
    Jerry

  • Distribution and collection wizard problem with formulas

    Hi gurus,
    I've an input schedule I want to distribute through the distribution wizard, this input schedule, has some rows where the user should enter data and some rows with formula using the data the user filled before.
    When I collect the data I notice that the wizard only collect the user entered and remain untouched the data from the formulas.
    If i enter the data in the input schedule directly (without using the distribution wizard) it works and the system send to the database the data I entered and the data from the formulas.
    I activated the parameter REFRESH_CACHE_BEFORE_COLLECT, but it doesn't make any difference.
    Any idea.
    Thanks in advance

    Hi Jose,
    Could you find a solution? We're having a similar problem.
    Thanks in advance

  • Problema con formula Node

    Buen día,
    estoy trabajando con un programa que me ayude a leer el caudal de una bomba de agua, el problema que tengo es que la formula node no me genera ningun dato.
    Agradeceria su ayuda
    Adjunto los archivos
    Adjuntos:
    Pantallazo problema formula node.png ‏172 KB
    Prueba 4.vi ‏58 KB

    Hola alipio;
    Algunas recomendaciones para tu código;
    1. Trata de ocupar los datos apropiados; usas I32 y Double lo qu eocasiona puntos de coerción y hace que tu código sea menos eficiente
    2. No tiene caso tener conectada la misma salida a dos esstructuras de casos iguales; puedes en su lugar utilizar sólo una;
    3. Trata de no hacer dobleces inecesarios en tus cables
    4. En cuanto al fórmula node; x, g son entradas y h,y son salidas; por lo que x=h no tiene sentido.
    Si quieres emplear el valor de la iteración anterior, puedes también obtenerlo del shift register; algo así como en la imagen de abajo. 
    Ojo; el VI no esta completo pero puse parte de tu código ahí
    En el caso falso de arriba (donde estan los contadores) se iguala contador 2 a cero, al igual que en tu select)
    Si tienes duda de como usar estas funciones avísame y con gusto puedo pasarte las ligas de algunos tutoriales
    Exito en tu aplicacicón

  • Problem with formula

    hi please provide me the solution for my scenario.
    i have actual quantity field and plan quantity filed.
    my client wants to analyze how accurately he is planning. so i need to calculate the %DEVIATION.
    my scenario is ...they planned to sell in particular qurter is 1. but actual is 0. so deviation is 100*0-1/1 = -100 %. BUT IF PLANNED QUANTITY IS 0. ACTUAL SOLD IS 1.
    THEN 1-0/0*100 = 1/0 *100 ....????
    HOW TO SOLVE THIS FORMULA..
    PLEASE ...PROVIDE THE SOLUTION.
    NAGA.

    hi Praveen,
    it may be usefull for you!!!!!!!!!
    in your case if you calcute it give value as INFINATE. so one function avilable in DATA FUNCTIONS  <b>NDIV0 ( )</b>it display value as 0 if X/0 other wise it will calculate and display the calculated value.
    Eg
    NDIV0 (1-0/0*100 )
    if it usefull please reward points.
    Regards

  • Problem with Formula defination

    Hello,
    please help me out on formula issue.
    Actually query is having vendor characteristic in rows and four formulas in colums as shown below
                              Formula1|Formula2|Formula3|Formula4|
    Vendor...............|
    For these formulas i am not getting respective vendor values .
    Formulas :
    'GI InvDiff.:whouse' - 'GR InvDiff.:wrhouse'
    + + '' '' ''
    '1' - - '1'
    '5' - - '5'
    '6' - - '6'
    i would like to know that what exactly this formuls do.
    Thanks in advance

    Hello Karthik,
    Thanks for your reply.
    can please tell me what exactly i have to check in the properties for the formula and i have pasted the forumlas which am using . if is there anything wrong with those defination.
    'GI InvDiff.:whouse' - 'GR InvDiff.:wrhouse'
    + + '' '' ''
    '1' - - '1'
    '5' - - '5'
    '6' - - '6'
    Thanks in Advance

  • IP Problem - Fox Formula - VARV with an hierarchy variable

    Hello,
    I would like to use the value of a variable but a hierarchy variable into a Planning function type formula
    I use the code but the system give an error.
    The first code :
    DATA CHA_PF TYPE 0PROFIT_CTR.
    CHA_PF = VARV(EVHAPF01, HIENM = PROFIT_CTR_BUDGET, VERSION= A).
    The second code :
    DATA CHA_PF TYPE 0PROFIT_CTR.
    FOREACH CHA_PF IN VARIABLE EVHAPF01,  HIENM = PROFIT_CTR_BUDGET, VERSION= A.
    I have the same error message : Variable PROFIT_CTR_BUDGET is not available in an active version
    The Profit Center hierarchie has the name PROFIT_CTR_BUDGET and it's active
    The variable EVHAPF01 has the characteristics : Hierarchy Node, Autorisation, Single Value, Variable is Ready for Input
    Could you please give me the correct code or the correct manipulation ?
    Thank you
    Edited by: Joël Vuillaume on Aug 19, 2009 5:12 PM
    Edited by: Joël Vuillaume on Aug 19, 2009 5:15 PM
    Edited by: Joël Vuillaume on Aug 19, 2009 9:50 PM

    Hi,
    Please check sap note 1086496 . This would solve your issue.
    If you use hierarchy node variables in formulas, you must specify additional context information in the FOREACH statement. You must always specify the hierarchy name.
    To do this, write HIENM = 'Variable for the hierarchy names' as an additional argument.
    If the hierarchy is time-dependent, you must specify a variable for the time. To do this, write: DATETO = 'Name for the date variable'.
    If the hierarchy is version-dependent, you must specify a variable for the version. To do this, write: VERSION = 'Name for the version variable'. 
    You must specify the information in the form of a global variable, that is, not with a variable that is defined as local in the formula. The syntax is as follows, for example:
    FOREACH GES IN VARIABLE  HIERVARBER, HIENM = HIE_NAM_1, VERSION= HIER_VERS.
    The hierarchy is version-dependent in the example.
    In your case, create a variable for hierarchy PROFIT_CTR_BUDGET and use it in VARV and Foreach.
    Thanks,
    Reshma M.

  • Problem entering formula for Cell Reference in Query

    Hi,
    In a query, I need to enter a formula in a cell reference
    1.
    Following instructions on Help.sap, I was supposed to “…In Query Designer, choose View  ® Cells from the menu bar to reach the functions of the cell definition …”
    I could not see these options, BUT, I saw an icon called Cell Reference.
    Is that the way? Why this difference with the instruction?
    2.
    While following cell reference icon, I saw my rows and columns and I wanted to put a formula at the intersection of the row, Product A and the column, YTD Adjusted Amount.
    The formula is as follows:
    (‘reference_cell_30’ > 0 ) *  ‘reference_cell_30’
    When I entered  (   .i.e. the parenthesis in the formula box it was ok but it won’t allow me to enter the rest of the formula.
    What could be wrong?
    What is the best approach to make the entries?
    Also, in this IDES test case, is reference_cell_30 referring to a cell as in MS Excel cells?
    Thanks in advance

    HI Amanda,
    No we can't treat Rows as one structure and columns as second structure....can u send screen shot of u r Query designer  [email protected]..will get back to u how a structure looks like...
    unless and ubtil u have structures in u r Query,cell definition cant be enabled...
    regards

Maybe you are looking for

  • Can different family member accounts share an address book in iCloud?

    we have a primary mobileme account which is now set up in icloud.  we have a family pack with a secondary family member account set up for my wife's business email.  This secondary account now also has its own icloud account that we set up.  Works fi

  • Freight for Purchase and sales process

    Hi, I have a scenario where i'll purchase material with Freight charges from the Vendor, Now the same freight charge i'll imposed on customer while billing. I'll be using same Freight GL account for both purchase and sales process. I have configured

  • Can't open my own Photoshop EPS file

    I'm using ID CS3. I created a clipping path on a photo, and from old force of habit, I saved it as an EPS instead of PSD (don't know if TIFFs can include clipping paths). Now I can't open the EPS in Photoshop. I get the "Could not complete your reque

  • [SOLVED] advanced shell script for mount and unmount samba share

    Good morning guys, Today I've a very long question.... Hope in your help....: I usually move from different network. For one of those I need to mount some share that are under an ActiveDirectory server. To do that I use samba. Especially I've made an

  • How to delete a page in thumbnail veiw when all connected in yellow box

    How do I delete a page from thumbnail view if they are all locked in one yellow box? Never happend before. What do I need to turn off? Why did it group the three pages? I added a page to the document and it grouped all three together. J