How to calculate "if Y divided 0 then value=1" ?

Hello,
The usual formula is for NDIV0 is NDIV0(y/z) = 0 if b=0, otherwise y/z.
I am looking for a way to get instead
NDIV0(y/z) = <b>1</b> if z=0
It is for the calculation of an indicator where "z" is the number of Outstanding problems and "y" is the number of Oustanding problems less than 30 days old. Therefore, if number of Outstanding problems (z) is equal to "0" (then y should also be equal to 0), you are OK and you should get a 1 (or 100%) score.
Any help would be welcome!

Hi Philippe,
    Based on the input you gave in the second part I would suggest you to go as I said below.
In a new selection just take values for Z
Similarly for Y.(Hide this)
<b>It is for the calculation of an indicator where "z" is the number of Outstanding problems and "y" is the number of Oustanding problems less than 30 days old. Therefore, if number of Outstanding problems (z) is equal to "0" (then y should also be equal to 0), you are OK and you should get a 1 (or 100%) score.</b>
As per your saying we can do the following.
Take new formula and write as below:This firmula in report represents value for Y
(z==0)*0
Which means if Z is equal 0, the value for Y will be shown as zero in the report.
Now to assign point you can create another new formula as below:
(nodiv(y/z==0)*1
This will give you the required output.
Hope this helps you......

Similar Messages

  • How to calculate variance between two dimension values

    Hello:
    I have built a cube in Analytical workspace (9.2.0.5) with 3 dimensions. Time, Product & Scenario. I am using BI Beans (thick client) for the presentation layer. What I need is the ability to calculate the variance between two dimension values of same measure. For example, if My scenarios are 'Actual' and 'Budget', when I present the results on the screen for any measure (e.g Total Sales), I should be able to calculate & display the difference between 'Actual' & 'Budget' values of that measure.
    I have more than 7 scenarios and more than 40 measures. It could even be the difference between two product categories. How do I do it either in AW or at BI Beans Level?
    Thank you very much for your help.
    regards
    Suresh

    You want to look at qualified data references in the OLAP DML references. Basically, any data reference may be qualified by specifying a dimension name and value:
    sales(time 'jan92')
    forces the dimension TIME to the member 'jan92', no matter whether 'jan92' is in status or not. The resulting expression is essentially no longer dimensioned by the dimension TIME.

  • How to calculate the sum of the values of some columns of a table

    hi
    i want to get in the column averages just the average of the values of some columns not all the columns of the table.what i have to change exactly in this block diagram.even if the size of the table is 25,i want the division to be the number of values in each column(= number of rows)
    just like that:
    Solved!
    Go to Solution.
    Attachments:
    operations on some columns.vi ‏10 KB

    i did exactely what u told me, i think i missed something because i don't get the average value of the rows i want
    Attachments:
    average.vi ‏11 KB

  • How to calculate the average inventory in ABAP

    Dear All,
    Please find the below formula and this formula how to calculate the Average inventory at value.Please let me know the abap base tables and the corresponding fields.
    Formula
    Inventory Turnover = Cost of Goods Sold (COGS) / Average Inventory at value.
    Thanks
    Regards,
    Sai

    Hi Arivazhagan,
    Thanks for your quick response .
    The field MBEWH from the table is fulfill the average inventory at value.
    For Eg :I want to calculate Inventory Turnover = Cost of Goods Sold (COGS)/
    Average Inventory at value.
    so shall i take Inventory Turnover = Cost of Goods Sold (COGS)/MBEWH
    The above formula will meet my requirement to find the average inventory Turnover.
    Thanks
    Regards,
    Sai

  • How to calculate the shared pool size ..........

    Does anyone know if there is a decent algorithm/method to calculate the shared pool size in Oracle 8.1.7.

    look my answer on your thread about db cache size
    How to Calculate the DB Block Buffer value.

  • How to calculate the Percentage differencebased on two values

    Not sure how to do this.
    Just want to calculate the % difference of two values (seem to have a problem when one value is zero)
    Here is the current output
    49 Apr 2
    64 Aug 1
    55 Feb 0
    Here is the output I would like to see
    49 Apr 2 4.08%
    64 Aug 1 1.56%
    55 Feb 0 0.00%
    Here is the current SQL
    Select TO_CHAR (RCA_CLOSE_DATE, 'Month') "Month",
    SUM (CASE WHEN RCA_CODE = 'BI&D' THEN 1 ELSE 0 END) "BI&D - CBAT No of Adj",
    Count(1) as "Count of Adjustments"
    from TW_BILL_ADJ_DATA
    where (RCA_CLOSE_DATE between nvl (:P8_DATE_FROM,FORM_RECEIVED)
    and nvl (:P8_DATE_TO, FORM_RECEIVED))
    group by TO_CHAR (RCA_CLOSE_DATE, 'Month')

    You can try something like this one:
    Select TO_CHAR (RCA_CLOSE_DATE, 'Month') "Month",
    SUM (CASE WHEN RCA_CODE = 'BI&D' THEN 1 ELSE 0 END) "BI&D - CBAT No of Adj",
    Count(1) as "Count of Adjustments",
    round(count(1)/SUM(CASE WHEN RCA_CODE = 'BI&D' THEN 1 ELSE 0 END) * 100,2) || '%' percent
    from TW_BILL_ADJ_DATA
    where (RCA_CLOSE_DATE between nvl (:P8_DATE_FROM,FORM_RECEIVED)
    and nvl (:P8_DATE_TO, FORM_RECEIVED))
    group by TO_CHAR (RCA_CLOSE_DATE, 'Month')
    CODE NOT TESTED !!!
    Best Regards
    Krystian Zieja / mob

  • How to calculate percentage and difference of two values in matrix report in ssrs 2008

    Hi everyone,
    DB--SQL server
    SSRS-2008
    I am creating matrix report with grouping on WEEK and Fiscalyearweek,
    I need to calculate of difference between FY14W01,FY15W01 ande  percentage of those..
    how to calculate in ssrs level.
    Thank You, Manasa.V

    Hi veerapaneni,
    According to your description, you want to calculated the increment percentage and difference between two fiscal year week within each week. Right?
    In this scenario, since we need to do calculation based on values between dynamically generated cells, we can't simply use expression to achieve this goal. In this scenario, we need to use custom code to record the value for fiscal 14 and fiscal 15, then
    we can calculate the difference and percentage within the column group. We have tested your case in our local environment, please refer to the steps and screenshots below:
    1. Add the custom code below into the report (you may need to modify the data type based on your scenario:
    Public Shared Value1 as Integer
    Public Shared Value2 as Integer
    Public Shared previous as string
    Public Shared previousweek as string
      Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
    If product =previous and Week =previousweek  Then
         Value2=Value
    Else
    previous=product
    previousweek=Week
    Value1=Value
    End If
         return Value
      End Function
      Public Shared Function GetPct()
         return (Value2-Value1)/Value1
      End Function
    Public Shared Function GetDiff()
         return Value2-Value1
      End Function
    2. Design the matrix like below:
    3. The result look like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How can I implement a get method that lets me divide two values, Help plz

    I need to implement a method that divides the values return by two other methods but I keep getting an error message, I think its divide by zero error ( I am not too sure on the exact error msg as I do not have java installed on this pc as yet), here is my example,
    I have two get methods that take an int value so say
    getValueOne() as method one
    getValueTwo() as method two
    Now I have a third method that does the following,
    Public int getValueThree() {
    int value =0;
    value = (getValueOne() / getValueTwo())
    return value;
    I am not two sure on the exact code but it does something like this and I get an error. Could someone please guide me how I can successfully implement a get method that divides two values that are returned by two methods.
    Thanks,
    Zub

    Hi, thanks for your reply. Right, how can I go about to throw an exception? I can definitely give the exact code and error message tomorrow when I can access my home pc.
    And you are right there are some values that are zero! I am not very sure what throwing an exception means to be honest. Could you please give an example?
    Thanks...

  • How to calculate value in SNMP performance rule?

    Hi there,
    My environment is running SCOM 2007 R2. Now I have a request to develop MP to monitor a network device which support SNMP. I successfully discovered the device. Then I created a performance rule using System.Performance.SNMPPerformanceProvider as data
    source to collect the bandwidth usage. However the value returned from SNMP query is bit per second. But we want it to display as MB per second.
    My rule is created as following
    1. a data source, with ID as "DS", is created using System.Performance.SNMPPerformanceProvider to query performance data via SNMP
    2. the data is write into DW
    I just need to divide the value returned from "DS" before write it into DW. Can any components under "Condition Detection" can be used to manipulate the data?
    Or any other tricks?
    Thanks!

    I reviewed the thread, and I believe there are 2 questions here:
     - the questions regarding the units in bit per second
    out of the box, SCOM will be unable to modify the data. In other words, you get the value, then that value is shown in the console. There may be ways to achieve what you are looking for, but out of the box I dont see that this is doable.
     - the questions regarding the output of the script
    I am by no means a scripting person, but the error seems to be an issue with the script itself ("The requested SNMP operation identified an unknown variable" maybe a problem with the variable definition?). if you believe that is unrelated, the
    only troubleshooting step that I can think of as a quick test is to run this with psexec as localsystem (as SCOM runs the workflows) and see if you are getting the same result. On an elevated command prompt, type PSEXEC -i -s -d CMD then that would open a
    new command prompt window as localsystem.
    hth
    Jose

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to calculate subtol and total values in alv.

    Hi expert,
    I want to calculate the subtol and total values in alv as follows,
    example:
       month:    Jan      Fer      Mar    Apr
                      -50       -30      40      -10
                      -20       -13      -12     -10
    subtotal      -70       -43      28      -20
                      -10       -10      -10     -10
                      -10       -31      -15     -10
    subtotal      -20       -41      -25     -20
    total           -90       -84       3       -40
    when i put '-' in front of the month,i define the month type c,
    and when the type is c,it cann't calculate the subtotals and totals.
    how can i do can make the layout like the example.
    thanks...
    Edited by: Heum Kim on Aug 25, 2008 3:54 AM

    The below code is not generic one. I am just looking for generic one. You try to fix it using the similiar approach.
    REPORT  ZTEST_ALV_DEC.
    data: fcat type lvc_s_fcat,
          tfcat type lvc_t_fcat.
    data: begin of itab occurs 0,
          carrid(10),
          quan type DEC_16_02_S,
          end of itab.
          itab-carrid = 'AA'.
          itab-quan = '-10000.00'.
          append itab.
    fcat-fieldname = 'QUAN'.
    fcat-tabname = 'ITAB'.
    fcat-decimals_o = 2.
    fcat-edit_mask = 'V__,___.__'.  "This is not generic
    append fcat to tfcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       IT_FIELDCAT_LVC                   = tfcat
      TABLES
        t_outtab                          = itab
    EXCEPTIONS
       PROGRAM_ERROR                     = 1

  • In Sales enquiary stage how system calculate EK02 condition value as cacula

    Hi
    In Sales enquiary stage how system calculate EK02 condition value as caculated cost
    Is there any cofig to get the value of EK02 condition for calculated cost at Enquairy stage only for forcasting
    Regards
    Santosh

    Hi,
    In our company we get the calculated cost into our sales document with the following configuration:
    IMG: Plant maintenance and customer service / Maintenance and service processing / Basic settings / Quotation creation and billing / ODP4 - Assign conditions to sales document types
    With this configuration, we assign the calculated cost condition (EK02) to the corresponding sales document. The system sends the calculated costs from the order to the corresponding sales order created.
    Regards,
    Óscar
    http://blogdesap.blogspot.com

  • How to calculate the ratio between the maximum and minimum peaks of the two waves using two looping to find the value of SPO2?

    hello everyone,
    i'm rai from indonesia
    I have a final project about pulse oximetriy, I have some problems,
    how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
    My program image can be seen below predicament ?
    Attachments:
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB
    spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi ‏249 KB

    Hi rai,
    I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
    That being said:
    - Your inner while loops each run exactly twice. Replace them with FOR loops!
    - Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
    - You already calculate some Min/Max values. Ratio is just a division of two values…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How could be calculate only result  for cummulative value in Webi level?

    Hi Expert,
    I have to requirement on webi level only result calculation
    scenario below like that
    Company code            % X
    100                      10
    200                      13
    300                      15
    Result           = only cummulative   (not sum eg 38)
    So how could be achieve  only this result value ??
    Pls advice
    Regards
    Waseem

    Hi,
    Gaurav and Arijit,
    Thnks for reply
    I have to need only Result values . I am giving one more scenario like that
    Company code         M               J                     L             D %
    100                              70              30                     10             = 10/(70+30)*100 = 10
    200                              80              20                     13           = 13/(80+20)*100 = 13
    300                               150             50                    30            = 30/(150+50)*100 = 15
    Result                                                                                    =    L/(M+J)*M = 53/400*300 = 39.75
    I hided the values M , J and L , need only result value above scenario so how could be achieve
    pls reply
    Regards
    Waseem

  • How could be calculate only result  for cummulative value in bex level?

    Hi Expert,
    I have to requirement on bex level only result calculation
    scenario below like that
    Company code         % X
    100                      10
    200                      13
    300                      15
    Result           = only cummulative   (not sum eg 38)
    So how could be achieve  only this result value ??
    Pls advice
    Regards
    Waseem

    Hi Suman,
    Thanks for reply
    I had already applied its came only sum values
    But i have to need only Result values . I am giving one more scenario like that
    Comapny code         M               J                     L             D %
    100                        70              30                     10             = 10/(70+30)*100 = 10
    200                        80              20                     13           = 10/(80+20)*100 = 10
    300                        150             50                    30            = 30/(150+50)*100 = 25
    Result                                                                          =    L/(M+J)*M = 53/400*300 = 39.75
    I hided the values M , J and L , need only result value above scenario so could be achive
    pls reply
    Regards
    Waseem

Maybe you are looking for

  • My iPod classic will freeze during sync.

    I have an 80gb ipod classic. Im using itunes on my imac and when i got to sync the ipod it starts then it freezes.  takes forever to load songs.. Mind you i have over 4,000 songs im trying to download... I still think it should sync a little faster.

  • I can no longer connect to the available wi fi networks with my ipad 1

    For some reason I can no longer connect to the available wi-fi networks with my ipad...help

  • Threads with http socket

    Are there any good tutorials that teaches multithreading with http sockets?

  • PCA report for balance sheet accounts

    Hi, i have assigned Profit Center in Material. So the Cunsumption account hit the Profit center. If i see the GL document profit center assigned at line item, but i couldnot able to view the PCA report for Balance sheet account Can you please help. T

  • Invisible non-printing areas in Excel . . .

    In Excel I can have a certain part of a spread sheet not print. This is useful, for example, with stuff for the tax office so that they cannot see non relevant information. When I import a file with such an "invisible" area into numbers, that feature