Calculate the percentage based on the other 2 columns column

I did 2 columns. These two columns are column_a = separate count of all documents and
column_b = separate count of the subset of records based on the specific condition.
I try to get column_3 = (column_b/column_a) * 100
These 2 columns comes from the same physical tables but two different logical tables (I have the condition where the different for each)
Result is correct (100) where column_a = column_b, but I get 0 when they are different
col_a, col_b %
8 7 0 why not 87.5
1 1 100
27 23 0 why not 85.2

NP, any chance of some reputation points if this has been helpful?
Thank you

Tags: Business Intelligence

Similar Questions

  • Search file, return of the other excel column value

    I tried the Excel research and this pension, but have not found something that can help yet. I have an Excel file which contains three columns. I want to find the first column with a value (1-99), and then returns the value of this same line, but the 3rd column. About the same as the VLOOKUP function, but I have not found a way to do in LV here is a basic example:

    Column1 | Column 2 | Column 3

    LB/01 PO2 3

    .

    .

    20 PEA 2

    For example, if '20' is entered, it will return the value "2".

    Thanks again

    buickgn wrote:

    About the same as the VLOOKUP function, but I have not found a way to do in LV

    Thanks again

    Well, use the VLOOKUP function then of _Application WorksheetFunction (a reference range for the Argument 2 pass).

    Ben64

  • calculate the deduction using the percentage and amount

    I have a dynamic form with three fields decimal:

    grossamount (grossamount)

    percentage of deduction (fwpercent)

    amount of the deduction (fwamount)

    I have the following scripts:

    Form1. #subform [0]. fwpercent::calculate - (FormCalc, client)

    fwamount/grossamount*100

    Form1. #subform [0]. fwamount::calculate - (FormCalc, client)

    grossamount*fwpercent/100

    I want to be able to change the amount or percentage and have it calculate the other, as shown in the scripts. If I open the form and taken in 100 for the gross amount, then 10 percent, the script works correctly, and 10 will be displayed in the w/h quantity. If I go to the fw amount field and replace it with 20, the percentage field still shows 10. the results are the same, if I make first, and then changes the percentage value but does not update if I do update percentage. This will only work for everything that I do everything first. I can't always fields depend on eachother whenever one of them is changed?

    changed for the scripts below and it works as expected:

    Form1. PaymentInfo.FederalWithholdingPercentage::exit - (JavaScript, client)

    FederalWithholding.rawValue=GrossAmount.rawValue*FederalWithholdingPercentage.rawValue/100;

    Form1. PaymentInfo.FederalWithholding::exit - (JavaScript, client)

    FederalWithholdingPercentage.rawValue=FederalWithholding.rawValue/GrossAmount.rawValue*100;

  • The Master Table column updated based on the sum of column Table detail


    With the help of JDev 11.1.1.6.

    I have a master-detail table based on a link to BC.

    The main table has a column that displays an InputText or an OutputText, based on the value in another column.

    If the InputText is displayed, the user can enter a value and the database will be updated with that value.

    If the OutputText is displayed, it must be a sum of a column in the secondary table.  Also, this value will be written in the database.

    Question:

    How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?

    The detail table column is a manually entered InputText field.

    Thank you.

    Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");

    This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation

    Ashish

  • missing parenthesis in insertion into separate lines select the table from the other table

    Hello

    could you help me with the following question?

    I have the following tables

    CREATE TABLE table1)

    ID varchar (12),

    col2 varchar (10),

    COL3 varchar (10),

    level varchar (10))

    CREATE TABLE table2)

    Id2 varchar (12)

    A varchar (10),

    B number (1)

    CONSTRAINT PRIMARY KEY PK (ID2, is));

    INSERT INTO table2 (ID2, A, B) SELECT ID, col2

    MAX (CASE WHEN level = "level 1" then 1

    level = 'level 2' then 2

    Level = 3 then 'niveau3') as colIN3)

    FROM table1 GROUP BY ID2, a.;

    the first table have duplicates as follows:

    Id2 COL2 COL3 level

    A1 pepe football level1

    A1 pepe football level2

    A1 pepe football level1

    A1 pepe basket level2

    A1 pepe pingpong level3

    the output should be selected with unique key (ID2, col3) lines and the level must be the greatest.

    Id2 COL2 COL3 level

    A1 pepe football level2

    A1 pepe basket level2

    A1 pepe pingpong level3

    The output of the script tells me the following messages:

    -lack of right parenthesis referring to the max function.

    Thanks adavance.

    Kind regards

    Hello

    Remember the ABC's of the GROUP BY:

    When you use a GROUP BY clause or in an aggregate function, then all in the SELECT clause must be:

    (A) a ggregate function,

    (B) one of the expressions "group By."

    (C) adding to C, or

    (D) something that Depends on the foregoing.  (For example, if you "GROUP BY TRUNC (dt)", you can SELECT "TO_CHAR (TRUNC (dt), 'Mon - DD')").

    To ask him, there are 5 columns in the SELECT clause.  The last one is a function MAX (...); It is an aggregate, is not serious.

    The first 2 columns are also named in the GROUP BY clause, so that they are well.

    The other 2 columns, country and internal_Id do not match any of the above categories.  These 2 columns cause the error.

    There are many ways to avoid this error, each producing different results.  You could

    • remove these 2 columns in the SELECT clause
    • Add these 2 columns in the GROUP BY clause
    • use the aggregation such as MIN, 2-column functions
    • remove the country from the SELECT clause and add internal_id to the GROUP BY clause
    • remove the internal_id from the SELECT clause, and add countries to the GROUP BY clause
    • ...

    What are the results you want?

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) for all the tables involved, so people who want to help you can recreate the problem and test their ideas.  Also post the results you want from this data, as well as an explanation of how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • How to format a cell to calculate the distance based on names of cities in the other two cells

    I am using 3.6.1 numbers to display distances in Miles or Km in column 3 based on the names of the cities in columns 1 and 2

    For example:

    "Boston' appears in the cell"A1"and"New York"in cell"B1. "  I would like that the cell "C1" then automatically read "215 Miles.

    I could not find a way to do it. Any help would be appreciated. Thank you in advance.

    Hi Nicolas,.

    Which you will store the information needed for the numbers compute these results?

    If she wants to be a direct calculation of the shortest distance, you will need the geographical location of each of the two cities, as well as an algorithm/formula for the calculation of the circle distance between these two places. Boston-New York, is about 190 miles.

    On distance (215 miles) of driving, the calculations are a bit more complicated. They require access to a wide range of data including a "route map" for the area that you want to include, then an algorithm that can look up cities, determine a route between them, find the distance of conduct for each section of this road and add them to the top.

    If you place a strict limit on the number of cities and have access to networks "driving distance" which were (and maybe still) included with the paper maps printed of gas stations or AAA (to the United States), CAA (Canada), the AA (in Britain) and other organizations to motorist elsewhere in the world, you might be able to manage it with one or more lookup tables and a search feature appropriate in column C.

    Otherwise, you may incur development of Google (or one of several others) team to reinvent the wheel, so to speak, and provide you a stand-alone application to do this.

    Or you can choose to use a more suitable and existing tool. Some choices are MapQuest, OpenStreetMap, Bing Maps, Google Maps, or maps (Apple) (included in recent versions of Mac OS X).

    Kind regards

    Barry

  • How the other drive app option to calculate calories? I did 45 minutes yoga with him and he showed the 260 callus which is high of 45 mins of yoga session.

    How the other drive app option to calculate calories? I did 45 minutes yoga with him and he showed the 260 callus which is high of 45 mins of yoga session.

    ISuspect that is not correct.

    Hello

    Saving workouts through the app to drive using others as the type of activity, active calories are estimated at a rate equivalent to a brisk walk or based on the data recorded by the heart rate sensor, according to what is higher.

    The following steps can help to improve the accuracy of the estimates made by your watch:

    • Estimates for calories and other results depend, in part, your personal information. To verify that it is accurate:
      • On your iPhone, in the application of the watch, go to: My Watch (tab) > health > Edit (top-right).
    • While training, to optimize the performance of the heart rate sensor (data from which is used when estimating calories), make sure you wear your watch fits on top of your wrist. Apple suggests that consider you the clamping Strip before starting a workout and it loosen again thereafter.
      • Note that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (such as running) rather than the irregular movements.
    • Calibrate your watch can improve the accuracy of various estimates related to the activity, including estimates of calorie. To calibrate your watch, follow the instructions in the link below support article. You can reset your calibration data and start the process:
      • On your iPhone, in the application of the watch, go to: Watch My > privacy > Motion & Fitness > tap reset Calibration data.

    More information:

    Use of the workout on your Apple Watch - Apple Support

    Your heart rate. What it means, and where on Apple Watch you will find. -Apple Support

    Calibrate your Apple Watch for better accuracy of training and activity - Apple Support

  • Mobile based on the size and the position of the other table

    I have the impression that there is an easy solution for this... or it there is no solution at all... but here goes:

    I want to use table 2 to indicate 'total time' as the sum of all time in table 1. Table 1 is set to automatically filter some lines (basically, it creates a dynamic playlist based on certain criteria). What I wish is to table 2 'float' a certain number of Table 1 below, so that as table 1 grows or shrinks according to the filtered content, table 2 remains the same distance from the bottom of table 1. Is - this unreasonable? It seems I've seen tables 'hustles' other tables according to size changes (not the desired effect in these cases, but what I DO want to here).

    Hi mikey,.

    This seems to be the default behavior in Numbers ' 09, but the function may not have been included in 3 numbers. I'm sure someone will test and report on it before long.

    Demo below is in Numbers ' 09.

    Coffee table is a double to the top. After positioning the lower level of the original table, I inserted two rows in the original and watched 'push' that the lowest low, keeping the space between them.

    I reformatted the cells in column B, CheckBox and verified that a few of them.

    Then I opened the Reorganize pane. and the filter rule (see the lines "... ") displayed the value:

    By clicking on "see the lines...". "box produces this result:

    Note: I had selected all the header cells in column B before starting the filter. The first image was captured after unchecking the checkbox 'display lines... '. "developing the table and leaving only the cells in the (previously) selected filtered lines.

    As mentioned, the example is in Numbers ' 09 / numbers 3 behavior may be different.

    Kind regards

    Barry

  • How to include the total number of table one fact in another fact table to calculate the percentage

    I have a fact table in the grain of each document created in any organization, say the 1st table of facts. I have another table of facts (2nd fact table) seen those documents which are considered by different commentators. grain of this second fact table is so each review, even if I document in both IDs the fact table.

    Now, I want to calculate the percentage return documents reviewed. For this I need to divide count separate from the document of performance by the total performance document. Now this document of total performance can be obtained from the 1st table of facts, but I don't get how to bring this indictment in the 2nd table of facts to show the percentage.

    Please let me know if there is no ambiguity in my question, because I'm a starter in OBIEE.

    Thank you very much.

    then you can set new logical column with two columns of fact in the formula

  • How to calculate the percentage of monthly sales

    Hello

    I have a column sales of the month and I have another column that calculates (monthly sales / (total number of monthly sales)) * 100.

    How to calculate this percentage of sales.

    Please advice.

    Kind regards

    Séverine.

    You can use the AGGREGATE function for the TOTAL monthly sales in the year:

    Something like: AGGREGATE ("measure monthly sales" to "Time" ".") Time hierarchy ".» An »)

    Calculate your final formula:

    "measure the monthly sales" / AGGREGATE ("measure monthly sale 'to"time'." Time hierarchy ".» Year') * 100

  • Calculate the percentage instead of add

    I did a classic report with three columns, of which the last is the percentage of the second in the first column. I mark the column of the sum for the first two, but I would like that the total line in report was also done to calculate the percentage.

    Example:

    Val1 Val2% cod

    X 10 4 40.00

    Y 20 3 15: 00

    Total: 30 7

    I would like to bring to the rest of column %, instead of the sum, to calculate the percentage (23.33%)

    It is a real hack, but it works on my example page

    (find the last line, from individual cells to last row and divide them into another)

    $(«#report_emp tr:last td:eq (2)' ") .text (parseInt ($(' #report_emp tr:last:eq(3)').text()) td / parseInt ($(' #report_emp tr:last td:eq(4)').text()))))))

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

  • Calculate the percentage registered

    Gurus,

    How can I get the correct value for the recorded percentage?

    Retail_Price = 100.00
    Sale_Price = 30.00

    Select (retail_price - sale_price/retail_price * 100) as prs_tab percentage_saved
    where prskey = 1516345;

    result = 9970

    result should be = 70

    What Miss me?

    Thank you!

    >
    How can I get the correct value for the recorded percentage?

    Retail_Price = 100.00
    Sale_Price = 30.00

    Select (retail_price - sale_price/retail_price * 100) as prs_tab percentage_saved
    where prskey = 1516345;

    result = 9970

    result should be = 70
    >
    Add parentheses around the numerator

    select ((retail_price - sale_price)/retail_price * 100) as percentage_saved from prs_tab
    where prskey = 1516345;
    

    Who will calculate the difference first: retail_price - sale_price = 70, which is 70% on retail price

  • Calculate the value based on the selection of the checkbox

    People from g ' Day,.

    I have myself a little stuck on a job that I have here, this javascript Gets the better of me.

    The idea is that this script takes the total sub and adds a surcharge for credit card (in percentage) based on a selection of the checkbox, then spit out the value to be entered in another field.

    If someone could have a quick look over what follows and let me know where I went wrong, it would be appreciated.

    ---

    Subtotal var = this.getField("SubTotal").value;

    var mastercardTick = this.getField ("MasterCard");

    var visaTick = this.getField ("Visa");

    var amexTick = this.getField ("Amex");

    Var extra = this.getField("CreditSurcharge").value;

    card credit var = this.getField("PayCredit").value;

    If (creditcard.value = 'Off') {}

    Event.Value = 0;

    } else {}

    If (mastercardTick.value = 'Yes') {}

    overload. Value = (1,2 / 100) * subtotal.value;

    } ElseIf (visaTick.value = 'Yes') {}

    overload. Value = (1,2 / 100) * subtotal.value;

    } ElseIf (amexTick.value = 'Yes') {}

    overload. Value = (3.75 / 100) * subtotal.value;

    } else {}

    Event.Value = 0;

    }

    }

    ---

    For lines like these:

    overload. Value = (1,2 / 100) * subtotal.value;

    If it should not be as:

    Event.Value = (1,2 / 100) * subtotal.value;

    The variable supplement is defined at the beginning of the script to the value of the field, so the surcharge.value parameter is not any sense.

  • How to calculate the Total price based on a rate of m² with different prices?

    Hello

    I'm guessing that it is a script, but I've never done any script so I would like to ask you guys...

    I have a form where I would calculate the total price for some carpet based on the price per sqm.

    -L the user enters the number of carpet needed.

    -There are different price points for 1-20, 21-60, 61 + m² (each with their own hidden field that contains the value of awards).

    -The Total Price field evaluates the relevant quantity and multiply by the square metre rate.

    Is it achievable?

    I guess that all solutions are placed in the "Custom calculation Script" field too?

    Thanks in advance!

    Yes. You can use something like this, as the custom of the price field calculation total (you may need to adjust the domain names):

    var sqm = Number (this.getField("SQM").value);

    rate of var = 0;

    If (sqm > 0 & m²)<=20) rate="">

    ElseIf (> 20 sqm & m²)<=60) rate="">

    ElseIf (> 60 sqm) rate = Number (this.getField("Rate3").value);

    M² = Event.Value * side;

Maybe you are looking for