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()))))))

Tags: Database

Similar Questions

  • 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

  • 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

  • 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

  • How to calculate the percentage change in a period

    Hello

    I have this table, and I need to select the year (VAR %) percentage between today and the day before,

    In this case below between 10 and 09 August and August 09 and 08 August,.

    EMPDATESALES% VAR
    10021201508101200
    10021201508091300
    1002120150808900
    1004520150810850
    10045201508091320
    10045201508081820

    Thanks if you can help

    Concerning

    Carlos

    OK, so now you have defined exactly what you mean by % VAR and in view of the expected results, how about this:

    Select the emp,

    EDATE,

    sales,

    sales - lag (sales) over (partition by order by edate emp) variation,

    (sales - lag (sales) over (partition by order by edate emp)) / sales '% VAR '.

    to my_data

    order of the emp, edate desc;

  • Calculate the percentage in RTF model

    Hello

    XML data:
    < ACTUAL_PERIOD > 0 < / ACTUAL_PERIOD >
    < BUDGET_PERIOD > 2308 < / BUDGET_PERIOD >

    I need the columns calculated as ACTUAL_PERIOD - BUDGET_PERIOD and I was able to do,
    <? xdofx:ACTUAL_PERIOD - BUDGET_PERIOD? >

    but I also need another column of percentage as ((ACTUAL_PERIOD-BUDGET_PERIOD)/BUDGET_PERIOD) * 100.

    I could not understand how to write a comprehensive xsl function to achieve the above.

    Help, please.

    Thank you.
    
    

    or

    
    

    or

    
    
  • Calculate the percentage of various errors (1309-REP REP - 1248 REP - 1517)

    Hello!

    I have a SQL query, which brings me two fields.

    The first field is of type varchar, and the second is the number of times that the first field has been returned.

    So overall let's call them A and B.

    How can I calculate B/AMOUNT (B) * 100?


    I tried different techniques and they all failed unfortunately. So please help me to point out what is wrong.

    1 formula column:
    function CF_POURCENTAGE_FORMULA return Number is
    begin
      :P_POURCENT := :TOT_SYS / :CS_G_TOT * 100;
      RETURN :P_POURCENT;
    end;
    2. Executive summary column
    function CF_POURCENTAGE_FORMULA return Number is
    begin
      :P_POURCENT := :TOT_SYS / :CS_G_TOT * 100;
      RETURN :P_POURCENT;
    end;
    3. summary column (% of total), (it worked but the % were adding up in a way that the last poster showed 100%)


    Kind regards

    THKKK

    Hello

    I have a SQL query, which brings me two fields.

    The first field is of type varchar, and the second is the number of times that the first field has been returned.

    So overall let's call them A and B.

    How can I calculate B/AMOUNT (B) * 100?

    So far, I can understand what you're trying. But the rest you have shown that you code I did not understand correctly. If you could explain that the way in which the report to print now and what you want to do extra for example. So, it's easy to say something. And what is the query also.

    -Clément

  • calculate the percentage of error in the table with a reference number

    Hello

    I am able to make the mistake of column 0, table...

    How I would be writing the code for the column 1, 2, as well as the n column?

    You really do need to learn more about arrays and scalars. You use tables 1 d as the scalars and arrays in tables 1 d 2D. Transpose two operations in a row is a NOP, why do it?

    Do not have the same code in all cases a case structure. Everything is the same thing belongs outside. Only one number differs between business and it's the only thing that belongs inside picture).

    Do not bury terminals inside the loops and other structures. They belong to the toplevel chart background.

    Here is a quick sketch.

  • Would it not be possible to make a selection based on the percentage instead of pixels? For example: 90% left, 5% of the upper part.

    Im having a little trouble getting a Photoshop Action to work the way I need to.

    Product photos are taken in different batches, and the only thing that is guaranteed, it must be transparent in the upper right. This means I need an action that makes a selection with the 'magic wand' tool and is independent to define an absolute selection through pixels (see images below).

    selection.PNG

    Photo: how it behaves

    selection2.png

    Photo: How I need to behave

    Anyone know how I can solve this problem without resizing the canvas to an exact size?

    Thank you in advance,

    Edvard

    Hi edvardkrupke

    Please try and change the rules per cent in Photoshop preferences.

    Check the screenshot below.once you change restart Photoshop to check

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • Calculate the percentage using narrative view?

    Hi all

    I have a table like this.

    Sales for the month in Prod
    Jan aa 4500
    Feb bb 5500

    Now, I'm going to display content like this by using Narrative view.we use OBIEE11g.

    sale of 5500 we recevied in FEB comapred to 4,500 of the previous month.it increase by 1%.

    Please any help.

    Thank you
    Aerts

    Published by: 958741 on September 14, 2012 03:24

    Published by: 958741 on September 14, 2012 06:08

    Check this thread:

    Re: formula in a narrative mode You may need to modify to your specific needs.

    So useful, please mark as correct or useful.

  • How to calculate the percentage for two columns?

    Hello friends

    Use the DECODE or CASE structure

  • 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

  • Help!  Calculate a percentage between two fields that the sum of columns

    Members of the forum good day!

    I'm hoping to get help with and model RTF I use to sum up the output of a query in PeopleSoft.

    I have a line with two fields of the query and a third field calculates a percentage using the query fields:
    Row1, Field1: EXPR14_14
    Row1, Field2: EXPR1_1
    Row1, Field3: <? xdofx: If EXPR1_1 <>0 and EXPR14_14 0 then (EXPR1_1 DIV EXPR14_14) <>* 100 or 0 end if? >

    I have a second row who has these fields:
    Row2, Field1: <? sum (EXPR14_14)? >
    Row2, Field2: <? sum (EXPR1_1)? >
    Row3, Field3: I need the third field to calculate the percentage of sum of two fields.

    I tried different ways to insert this calculation with no luck. It's my first time to create a rtf report and any help would be gratly appreciated.

    In advanced thank you for your help.

    Kind regards
    Raquel

    For the calculation of percentage you can use something similar to this (adjust the formula you need)

    For Row1, Field3:

    Hope that helps. If you need more help, send me the xml file and the [email protected] model

    Thank you
    Bipuser

  • Need a Script to the space of images on a total gap, then tag each image with the percentage of the total image space

    By editing the other scripts, I found here and other sites (including the labels size rorohiko), I worked on a script that will each image with the dimensions of the label and calculate the percentage of the spread of everything (including the text, white space).

    Now, I was invited to a script that tagged the images with the percentage of total image on a gap space. This script is so space images on a total gap, then tag each image with the percentage of the total image space. For example if there is an image that is 10 x 10 inches and four pictures that are images of 2.5x2.5, 10 x 10 would be tagged with 50% and the 2.5x2.5 would be tagged with 12.5%.

    This is the script that does the percentage of total circulation. Can some clever person get to do what I need?

    Suze

    (Sorry, I don't know how to post the script here with line numbers!)

    //

    This script adds printing of information labels to each graphic image. The labels are on a separate layer

    named "PercentageLabels" so that all these added labels can be removed again by simply removing

    the layer.

    //

    If you move or resize items, simply re-run the script to update the labels.

    //

    Before (re) start the script, you can define a paragraph style "SizeLabelStyle".

    This style will apply to all content on labels.

    //

    Before (re) start the script, you can set a style of object 'SizeLabelObjectStyle '.

    This style of object apply to all executives of the label - so if you want a specific background

    fill out or frame, do it through this object style.

    //

    You can change the units of the size label. I put in inches. Change the line below that has

    kUnitToUse - you can use:

    MeasurementUnits.CENTIMETERS

    MeasurementUnits.CICERO

    MeasurementUnits.INCHES

    MeasurementUnits.MILLIMETERS

    MeasurementUnits.PICAS

    MeasurementUnits.PIXELS

    MeasurementUnits.POINTS

    //

    By default the script will not attempt to label the "nested" images If you also want to label

    nested images (for example inline images, anchored frames, pasted images in the images,...) to change the line

    below to read:

    kLabelNestedItems = 1

    //

    If you want a specific image to stay without a label, you can use the Script label palette for

    assign a script called 'ignore' for this frame. The script will then not label this framework to the

    the title of the script is removed again.

    //

    Change the lines with kDontLabelImageFrames, kDontLabelTextFrames, kDontLabelOtherFrames

    below if you want to restrict labelling to only certain types of images: replace the '0'

    in "1" to enable these options.

    //

    Change the line with kShowImageFileName if you also want to display the names of the image in the

    size for the picture frames.

    //

    Small frames are not labelled - the cutoff point is currently a less than 0.1 inch high framework

    or 0.1 inch wide. You can change the cutoff point by adjusting the lines with kDontLabelBelowWidth

    or kDontLabelBelowHeight below.

    //

    var Girard;

    var gScriptFile;

    var gCaches;

    // ****************

    That's cheating spread automatically calculated

    var doc = app.activeDocument;

    doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;

    doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;

    PageWidth = doc.documentPreferences.pageWidth var;

    stucture var pagewidth = * 2;

    var spreadheight = doc.documentPreferences.pageHeight;

    var spreadsquinch = stucture * spreadheight;

    Alert ("the total measure of square inch of spread is:" + spreadsquinch);

    //******************

    VR;

    {

    If (app.activeScript instanceof file)

    {

    var gScriptFile = app.activeScript;

    }

    }

    catch (Girard)

    {

    }

    If (typeof (kLogLevel) is "undefined")

    {

    const kLogLevel = 5;

    const kMaxLogNestLevel = 5;

    const kLogToMessageBox = 0;

    const kLogToConsole = 0;

    const kLogToFile = 0;

    const kLogFileName = "PercentageLabels.log";

    const kIgnoreFrameLabel = "ignore."

    const kSizeLabelLayerName = "PercentageLabels";

    const kLabelNestedItems = 0;

    const kDontLabelImageFrames = 0;

    const kDontLabelTextFrames = 1;

    const kDontLabelOtherFrames = 0;

    const kUnitToUse = MeasurementUnits.INCHES;

    const kShowImageFileName = 0; This set to 1 to precede the name of the image file in the tag

    Below all of the measures are expressed in kUnitToUse (e.g. inches if MeasurementUnits.INCHES is used)

    const kRoundToDecimals = 2;

    The separator to use between objects - for example MyImage.jpg - 7.22 x 9,34

    const kSeparatorBetweenNameAndSize = "-";

    const kSeparatorBetweenHeightAndWidth = "H x"; "

    const kSeparatorAfterWidth = "W";

    const kDontLabelBelowWidth = 0.1; In kUnitToUse

    const kDontLabelBelowHeight = 0.1; In kUnitToUse

    const kLabelStyleName = "SizeLabelStyle";

    const kLabelObjectStyleName = "SizeLabelObjectStyle";

    const kLabelHeight = 0.6; In kUnitToUse

    const kLabelWidth = 2.5; Expressed in kUnitToUse (e.g., inches).

    }

    var gRunState =

    {

    logToMessageBox: kLogToMessageBox,

    logToConsole: kLogToConsole,.

    logToFile: kLogToFile,.

    functionNestLevel: 0,

    logFunctionEntry: true,

    logFunctionExit: true,

    logLevel: kLogLevel,.

    logFileName: kLogFileName

    };

    Main();

    // ****************

    function ConvertToFrame (thePageItem)

    {

    / * / / / LogEntry ("ConvertToFrame");

    var retVal = thePageItem.getElements () [0];

    / * / / / LogExit ("ConvertToFrame");

    Return retVal;

    }

    // ****************

    function CollectionToArray (theCollection)

    {

    / * / / / LogEntry ("CollectionToArray");

    var retVal = theCollection.everyItem () .getElements () .slice (0);

    / * / / / LogExit ("CollectionToArray");

    Return retVal;

    }

    // ****************

    function GetImageFile (pageItem)

    {

    / * / / / LogEntry ("GetImageFile");

    var imageFile = null;

    do

    {

    Try

    {

    pageItem = ConvertToFrame (pageItem);

    If (!) (("allGraphics" in pageItem))

    {

    break;

    }

    var allGraphics = pageItem.allGraphics.slice (0);

    If (allGraphics.length == 0)

    {

    break;

    }

    var chart = allGraphics [0];

    var graphic.itemLink = link;

    imageFile = new File (link.filePath);

    }

    catch (Girard)

    {

    }

    }

    While (false);

    / * / / / LogExit ("GetImageFile");

    return imageFile.

    }

    // ****************

    function GetImageName (pageItem)

    {

    / * / / / LogEntry ("GetImageName");

    var imageName = "";

    do

    {

    var imageFile = GetImageFile (pageItem);

    If (imageFile is nothing)

    {

    break;

    }

    imageName = imageFile.displayName;

    }

    While (false);

    / * / / / LogExit ("GetImageName");

    return imageName;

    }

    // ****************

    function GetOuterPageItem (pageItem)

    {

    / * / / / LogEntry ("GetOuterPageItem");

    var retVal = null;

    do

    {

    Try

    {

    retVal = pageItem.parent;

    If (retVal instanceof spread | retVal instanceof Page)

    {

    retVal = pageItem;

    break;

    }

    If (retVal instanceof character)

    {

    retVal = GetOuterPageItem(retVal.parentTextFrames[0]);

    break;

    }

    }

    catch (Girard)

    {

    retVal = null;

    }

    }

    While (false);

    / * / / / LogExit ("GetOuterPageItem");

    Return retVal;

    }

    // ****************

    function LogMessage (message, collapseLines)

    {

    If (gRunState.logToConsole)

    {

    $.writeln (message);

    }

    If (gRunState.logToFile)

    {

    var logFile = new file (gScriptFile.parent + "/" + gRunState.logFileName);

    var now = new Date();

    logFile.open ("a");

    logFile.write (now.toString () + ":"+ message + "\n" ');

    logFile.close ();

    }

    If (gRunState.logToMessageBox)

    {

    Alert (message);

    }

    }

    // ****************

    LogEntry (message) function

    {

    If (gRunState.logFunctionEntry)

    {

    If (gRunState.functionNestLevel < kMaxLogNestLevel) {}

    for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)

    {

    message = "" + message;

    }

    Filled (message + "<", true);

    }

    }

    gRunState.functionNestLevel ++;

    }

    // ****************

    function LogError (message)

    {

    If (gRunState.logLevel > = 1).

    {

    LogMessage ("* ERROR *:" + message, false);

    }

    }

    // ****************

    function LogExit (message)

    {

    -gRunState.functionNestLevel;

    If (gRunState.functionNestLevel < 0)

    {

    LogError ("LogExit: unbalanced nesting of function");

    }

    If (gRunState.logFunctionExit)

    {

    If (gRunState.functionNestLevel < kMaxLogNestLevel) {}

    for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)

    {

    message = "" + message;

    }

    Filled (message + ">", true);

    }

    }

    }

    // ****************

    function LogNote (message)

    {

    If (gRunState.logLevel > = 3)

    {

    LogMessage ("Note:" + message, false);

    }

    }

    // ****************

    function LogWarning (message)

    {

    If (gRunState.logLevel > = 2)

    {

    LogMessage ("WARNING:" + message, false);

    }

    }

    // ****************

    function Main()

    {

    / * / / / LogEntry ("Main");

    var savedUserInteractionLevel = app.scriptPreferences.userInteractionLevel;

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

    do

    {

    Try

    {

    activeDocument var = app.activeDocument;

    If (!.) (activeDocument instanceof Document))

    {

    LogError ("hand: activeDocument isn't a Document");

    break;

    }

    var savedHorizontalMeasurementUnits = activeDocument.viewPreferences.horizontalMeasurementUnits;

    activeDocument.viewPreferences.horizontalMeasurementUnits = kUnitToUse;

    var savedVerticalMeasurementUnits = activeDocument.viewPreferences.verticalMeasurementUnits;

    activeDocument.viewPreferences.verticalMeasurementUnits = kUnitToUse;

    var savedRulerOrigin = activeDocument.viewPreferences.rulerOrigin;

    activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;

    do

    {

    Try

    {

    ProcessFrames (activeDocument);

    }

    catch (Girard)

    {

    Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."

    }

    }

    While (false);

    activeDocument.viewPreferences.rulerOrigin = savedRulerOrigin;

    activeDocument.viewPreferences.horizontalMeasurementUnits = savedHorizontalMeasurementUnits;

    activeDocument.viewPreferences.verticalMeasurementUnits = savedVerticalMeasurementUnits;

    }

    catch (Girard)

    {

    Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."

    LogError ("Hand throw" + Girard);

    }

    }

    While (false);

    app.scriptPreferences.userInteractionLevel = savedUserInteractionLevel;

    / * / / / LogExit ("Main");

    }

    // ****************

    function ProcessFrames (doc)

    {

    / * / / / LogEntry ("ProcessFrames");

    var err;

    do

    {

    If (!.) (doc instanceof Document))

    {

    LogError ("ProcessFrames: doc should be a Document");

    break;

    }

    Try

    {

    var existingLayer = doc.layers.itemByName (kSizeLabelLayerName);

    existingLayer.id;

    existingLayer.remove ();

    }

    catch (err)

    {

    }

    If (kLabelNestedItems)

    {

    var pageItems = doc.allPageItems.slice (0);

    }

    on the other

    {

    var pageItems = CollectionToArray (doc.pageItems);

    }

    var frameReferences = [];

    for (var pageItemIdx = 0; pageItemIdx < pageItems.length; pageItemIdx ++)

    {

    do

    {

    var pageItem = pageItems [pageItemIdx];

    If (pageItem.itemLayer.name is kSizeLabelLayerName)

    {

    break;

    }

    var pageItem = ConvertToFrame (pageItem);

    If (instanceof TextFrame pageItem)

    {

    If (kDontLabelTextFrames)

    {

    break;

    }

    }

    ElseIf (pageItem graphic instanceof)

    {

    If (kDontLabelImageFrames)

    {

    break;

    }

    }

    on the other

    {

    If (kDontLabelOtherFrames)

    {

    break;

    }

    }

    If (pageItem.label.toLowerCase () is kIgnoreFrameLabel)

    {

    break;

    }

    var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];

    var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];

    If (width < kDontLabelBelowWidth)

    {

    break;

    }

    If (height, kDontLabelBelowHeight)

    {

    break;

    }

    frameReferences.push (pageItem);

    }

    While (false);

    }

    var sizeLabelLayer = doc.layers.add ({name: kSizeLabelLayerName});

    for (var pageItemIdx = 0; pageItemIdx < frameReferences.length; pageItemIdx ++)

    {

    Try

    {

    var pageItem = frameReferences [pageItemIdx];

    var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];

    var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];

    var labelItem = doc.textFrames.add (null, LocationOptions.BEFORE, GetOuterPageItem (pageItem));

    labelItem.itemLayer = sizeLabelLayer;

    var boxsquinch = width * height

    var boxpercent = (boxsquinch / spreadsquinch) * 100

    var roundpercent = Math.round (boxpercent)

    var labelText = "";

    If (kShowImageFileName)

    {

    var imageName = GetImageName (pageItem);

    If (imageName! = "")

    {

    labelText += imageName + kSeparatorBetweenNameAndSize;

    }

    }

    labelText += RoundString (height, kRoundToDecimals) + kSeparatorBetweenHeightAndWidth + RoundString(width, kRoundToDecimals) + kSeparatorAfterWidth + ' \r\n'+ roundpercent + '% ';

    labelItem.contents = labelText;

    xPos = pageItem.geometricBounds var [1];

    yPos = pageItem.geometricBounds var [0] + kLabelHeight;

    labelItem.geometricBounds is [Posy, xPos, yPos + kLabelHeight, xPos + kLabelWidth];.

    Try

    {

    labelItem.parentStory.characters.everyItem () .appliedCharacterStyle = doc.characterStyles.item (0);

    }

    catch (err)

    {

    }

    Try

    {

    labelItem.parentStory.paragraphs.everyItem () .appliedParagraphStyle = kLabelStyleName;

    }

    catch (err)

    {

    }

    Try

    {

    labelItem.appliedObjectStyle = doc.objectStyles.itemByName (kLabelObjectStyleName);

    }

    catch (err)

    {

    }

    }

    catch (err)

    {

    }

    }

    }

    While (false);

    / * / / / LogExit ("ProcessFrames");

    }

    // ****************

    function RoundString (numVal, decimal)

    {

    / * / / / LogEntry ("Round");

    var retVal = Math.round (numVal * Math.pow(10,decimals)) + "";

    retVal = retVal.substring(0,retVal.length-decimals) + "." + retVal.substring(retVal.length-decimals);

    / * / / / LogExit ("Round");

    Return retVal;

    }

    What do you mean?

    var myDoc = app.activeDocument;
    var mySpreads = myDoc.spreads;
    var myRectangles = myDoc.rectangles;
    var myImages = 0;
    for (var i = 0; i < mySpreads.length; i++) {
        var mySpreadWidth = 0;
        var mySpreadHeight = myDoc.documentPreferences.pageHeight;
        for (var j = 0; j < mySpreads[i].pages.length; j++) {
            mySpreadWidth += myDoc.documentPreferences.pageWidth;
            }
        var mySpreadArea = mySpreadWidth * mySpreadHeight;
        var myImages = mySpreads[i].rectangles;
        var myTotalImageArea = 0;
        var myIndividualImageArea = [];
        for (var j = 0; j < myImages.length; j++) {
            var myImageGeometricBounds = myImages[j].geometricBounds;
            var myImageWidth = myImageGeometricBounds[3] - myImageGeometricBounds[1];
            var myImageHeight = myImageGeometricBounds[2] - myImageGeometricBounds[0];
            myIndividualImageArea[j] = (myImageWidth * myImageHeight);
            myTotalImageArea += myIndividualImageArea[j];
            }
        for (var j = 0; j < myIndividualImageArea.length; j++) {
            alert("Image percentage of total images on spread " + (i + 1) + " = " + (myIndividualImageArea[j] * 100) /myTotalImageArea);
            }
       alert("Total image percentage on spread " + (i + 1) + " = " + myTotalImageArea);
       }
    
  • Calculate the date of the first or last in a quarter

    Hello

    I have data of project with a start date and end date I need to calculate the number of days per quarter

    project x: 15/03/06 - 15/05/06
    15 days Q1 = Q2 = 45 days

    I'm then going to calculate the percentages of resource. I can get the bt of the watch with a hack of a time to identify the first or the last day of a given quarter. Any help win my sincere admiration.

    Sorry, misread the question. The district will rely on the company that you work for. If the end of his is the same as an end of year calendar (31 December), then the example below will be accurate. Change the dates according to the needs of the company.
    You can hardcode the variables in your application.cfm page.
    quarter1start = "01 - jan -";
    quarter2start = '01 - apr -';
    quarter3start = "01 - jul -";
    quarter4start = '01 - oct -';

    Programatically, the end of each quarter is always the day before the start of the next quarter.
    I would add "year" to the equation dynamically, to keep in it before compatible.

Maybe you are looking for

  • The 'signet' will not accept a new address.

    I had a set bookmark 'capitalone check' for a few years. Last week, I tried to use it but you posted a performance that this address was not safe. I am able to contact Capitalone Direct Banking using their address in the browser. I deleted the name o

  • Need new hard disk for Equium A100

    Hello I want to replace the 80 GB HDD of my A100 for something big.I'm guessing it's a SATA, I'll need? Nobody knows what is the greatest, my laptop can handle without any performance?Just to confirm that it is a satellite A100-027 Also, I literally

  • Remove the first 5 blocks in a data stream

    Hi all I have a problem to remove the first 5 blocks in the data stream. My sampling rate is 1 s, block size is 1 and the entrance is the module «the ddf file read» I use the following modules for an average analysis 30 years running. [read the folde

  • Error 0x80072efe

    I use Windows 7 Ultimate 32 Bit improved Vista in November 2010 on a laptop HP DV9000. I tried various free Scans and I finally found success with Windows Live One Care. It is more than a thousand of registry errors. I had Security Essentials but it

  • Something there significantly in SharedObject in SDK 0.9.3? (MUST BE A BUG?)

    Does anyone know if something has changed significantly in the implementation of SharedObject? I noticed a very strange behavior of my application. In my application one can track the items in list. The first time the application is used (with a Shar