Calculated field won't display on canvas

I am importing login and logout times to Xcelsius v 5.4.0.0 using a web service.  Once the data is imported I am calculating the minutes between the login and logout by subtracting the login from the logout in the Xcelsius spreadsheet.
I import DATE, USER, LOGIN, & LOGOUT to columns A:D in  my spreadsheet.  Column E contains the formula D2 - C2 to calculate the minutes, where D2 is the logout and C2 is the login.
I cannot get the calculated times to display on the canvas.  I have tried both a list view and a spreadsheet table.  I set the DISPLAY DATA property of either the list view or spreadsheet table to columns A:E in my spreadsheet.  When I do Preview and import my data, all the data shows up EXCEPT THE MINUTES CALCULATION.  That field is always blank.
I tried displaying the raw data tab, and the minutes calc is always blank. I created another tab named display data, added formulas to it to copy over the info from the raw data tab and tried displaying that instead.  I thought perhaps the actual calculation was causing a problem.  That didnu2019t work either.  The minutes calc column is always blank.
I tried changing the format of the labels in the spreadsheet table or list view from general to numeric to time, but it makes no difference.  There is no data in the column to format.
If I paste data into the spreadsheet while in design mode, the calculated minutes DO APPEAR in the list view on the canvas.  If I then go to Preview mode, the data is still there, including the calculated minutes. However as soon as I give it a new date range in Preview mode and refresh the data through the web service, the minutes column is again blank.
Since the list view does display the calculated minutes if I paste data in the spreadsheet in design mode, and since the exported spreadsheet snapshot contains the correct calculations when I import data using the web service,  it appears that the data is being displayed on the canvas before the time calculations are taking place, resulting in a blank column.
Has anyone else experienced this?  What am I doing wrong?  I am sure I should be able to do this, but evidently donu2019t understand how. Iu2019ve attached the exported spreadsheet snapshot as a reference.
Thanks!

Hi there - I checked your site on my PC and it does not display. I've found this on a number iWeb created site, so you are not alone.
However, I have found iWeb created sites that display well on PC's, they are http://leapfrogenterprise.com and http://donandkasha.com - if you view the 'source', notice they used frames to display their site... Best wishes on your project, Rick
iMac G5 iSight 20" - 30G iPOD - HP Pav 15" WS and Toshiba Sat 17" WS   Mac OS X (10.4.7)   Canon 20D & A620

Similar Messages

  • Database field won't display

    I'm new to Crystal Reports in .NET but I do have my 1st report working except for one field that I'm trying to use in a sub report.  It's in my database fields just like the other field for the sub report.  I can see data for both fields in the Browse Data.  One field and it's heading display just fine but I can't see the other one anywhere.  The field heading that's created when I drag it into the Detail area won't display in the report either.  I've tried deleting the field and readding it but nothing helps.  As far as I know I've done nothing to suppress this field from printing.  I REALLY need to get this working.  Thanks for your help.

    Hello Paul,
    I recommend to post this query to the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
    That forum is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports .NET Development queries remain in one place and thus can
    be easily searched in one place.
    Thanks a lot,
    Falk

  • Formula field won't display

    Post Author: Richard bates
    CA Forum: General
    Sorry for the overly-generic subject, but I'm not exactly sure how to classify this problem.  I'm convinced it's a Crystal Reports bug but would be delighted to be convinced otherwise.  Here's the issue:
    Whenever I create a formula field in the format of trim(field A) " "trim(fieldB) and use the field in a report, if field B is null the data for the entire field will be skipped in the report.  Doesn't matter if the formula is in a group header or the detail line, the result is the same.  I've created a formula with the obvious conditionals, ie, if field B is null then trim(field A) else trim(fieldA)" " trim(fieldB) but that doesn't work either.  I am trying to combine two address lines.  In most cases there is not a second address field, so most addresses don't display using this method.  Someone on another board suggested a workaround which I am using (placing the second address line in it's own group and then suppressing the group when empty) but I have another instance where this won't work, ie, in the detail line.  I'm trying to actually combined three fields (first name, last name, and title).  In this case it is title which is usually blank.
    Am I missing something head-slapping obvious here?
    Thanks in advance
    Richard Bates

    Post Author: foghat
    CA Forum: General
    Seems to me I've come across the same thing way back.  It is a crystal thing, bug or just the odd way crystal does some stuff, I'm not sure (is there a difference?)  I can't remember what my fix was, think I may have had some logic similar to what you tried, but I had more than 2 address fields to compare, it sucked. You could try this (basic syntax):dim str0 as stringdim str1 as stringstr0 = trim{field A}str1 = iif (isnull ( {field B} ), "", trim {field B})formula = str0 & " " & str1 Add the iff logic to str0 as well if field A can be null. Things like this are why, when possible, I like to build as much logic as possible into a database view and then just use crystal for displaying the data.

  • Merge field won't display if number is 0.00

    When the value 0.00 is brought into the word document via merge field, nothing displays.  If the value is greater than 0.00, it displays that value.  Is there way to display the 0.00?

    To control number & currency formatting in Word, add a numeric picture switch to the mergefield. To
    do this:
    • select the field (e.g. «MyData»);
    • press Shift-F9 to reveal the field coding. It should look something like {MERGEFIELD MyData};
    • edit the field so that you get {MERGEFIELD MyData \# $,0.00} (or whatever other numeric format you prefer - see below);
    • position the cursor anywhere in this field and press F9 to update it;
    • run your mailmerge.
    Note1: The '\# $,0.00' in the field is referred to as a numeric picture switch. Other possibilities include:
    • \# 0 for rounded whole numbers
    • \# ,0 for rounded whole numbers with a thousands separator
    • \# ,0.00 for numbers accurate to two decimal places, with a thousands
    separator
    • \# $,0 for rounded whole dollars with a thousands separator
    • \# "$,0.00;($,0.00);'-'" for currency, with brackets around negative numbers and a hyphen for 0 values.
    The precision of the displayed value is controlled by the '0.00'. You can use anything from '0' to '0.000000000000000'. 
    If you use a final ';' in the formatting switch with nothing following, (eg \# "$,0.00;($,0.00);") zero values will be suppressed. Note that this suppresses 0s resulting from empty fields and from fields containing 0s.
    If the above doesn't resolve your issue, it may be that the expected zeros are actually empty fields. In that case, you should be able to get the desired output by embedding the MERGEFIELD in a formula field, thus:
    • select the field (e.g. «MyData»);
    • press Ctrl-F9 to embed the field in another field, thus { «MyData» };
    • edit the field code so you get {=«MyData» \# $,0.00} (or whatever other numeric format you prefer);
    • position the cursor anywhere in this field and press F9 to update it;
    • run your mailmerge.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Form fields won't display input information

    We are having a very odd issue that's happened on two occassions. We have a basic PDF form where someone has input information into various fields, but the information doesn't display, unless you click within the field. At that point you can see what's been typed in. As soon as you tab to the next field, the information is no longer visable -- it's still there, but you can't see it. I don't know if this is relavent, but it's interesting that one part of the form has some checkboxes and that information displays with no problem.
    One form was one we created in-house, and we've been using it for about 9 months with no problems at all. The other form is an external form that was sent to us.
    Neither of these are a LiveCycle designer form.
    We get the same results regardless of whether we open within Mac or Windows.
    Both forms, in their final state, were emailed to us via an outside source (different, unrelated sources). That seems to be the only common attribute.
    Any ideas?

    One thing you can try is opening the form in Acrobat, exporting the form data to an FDF file, and re-import it.
    You can also run a JavaScript the will correct things as much as possible. For example, see: http://blogs.adobe.com/pdfdevjunkie/script_to_fix_mac_osx_previewa.html
    I've written a script that is more comprehensive in that it addresses other type of fields. Post again if you'd like it.
    Please note, though, that any of these methods can only do so much. Preview screws things up in a way that's not easily reversible.

  • Issue with web part connections : won't display data when the lookup field is a calculated field

    Hello,
    I have a list A with a calculated field named A.A. I have a list B that has a lookup field to list A, to field A.A, named B.A. I add the two lists in a wiki page and I try to connect them - I.E., select a row from A and the rows from B would be automatically
    filtered.
    The B\Connections\get filtered values from A and select Provider:A.A, Consumer B.A doesn't bring any results. If I do the exact opposite: A\Connections\get filtered values from B and select Provider:B.A, Consumer A.A  works fine. But, this is not what
    I want.
    If the A.A isn't calculated field, everything works fine. So, it looks like there's an issue with calculated fields acting as consumers.
    Is this a known issue and are there any know workarounds? A workaround is to abandon calculated field and  use sharepoint designer workflow.
    Thank you
    Christos

    Hi,
    According to your post, my understanding is that you had issues about connecting web parts.
    I try to reproduce the issue, however, everything works well.
    Create a custom list named List A, add a caculated column named A.A(Formula: =Title).
    Create a custom list named List B, add a lookup column named B.A(List A: A.A).
    Create a page and then insert the two list view web parts.
    Edit page, select List B->Connections->Get Filtered Values From List A.
    Then I can filter the List B.
    I recommend to create another caculated column and get filter value form it to check whether it works.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Plus signs displaying in calculated field

    I have created a form with a table that has a row that calculates automatically. I then created another form that I copied and pasted the table into. In the second form, when my users display or print the form with Adobe 7.0 Standard, the calculating field now displays a plus sign when nothing is entered to calculate. How do I make the plus sign disappear?

    Actually, that was my first instinct as well, but it is not the issue. No matter how large I make the fields, no matter where I put them (IE not touching any other fields) - the plus signs still display. The really frustrating thing is that they won't display for me, just for other users. I have Adobe 7.0 Pro and we have just updated our users with Adobe 7.0 Standard. The plus signs do not display for me, but they do for the other users. To make the problem even less consistent, I had the exact same table in another form and in that form the users have used that table without any issues. I merely copied and pasted the table into the new form. I can't see any settings that have been changed. Any ideas?? Even a work around would be great.
    Thanks,
    Rebecca

  • Calculated Field formula not appearing in Power View Field List panel

    Hi,
    On Power View1 sheet of this
    workbook, the two PowerPivot calculated Field formulas (First Visit and First date of FY) are not appearing in the Power View Fields panel on the right hand side.
    I want to drag client and First Visit (calculated Field) to the Power View.
    Why is this happening?
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    I found a workaround for it - I was having the same problem as you. I wanted to display the last refresh date of my data, but Power View wouldn't display a date resulting from the [Last Refresh]=MAX(Date[Date]) formula.
    HOWEVER, a Pivot Table can handle that Calculated field just fine. So I renamed my measure "Refreshed Date" and added another tab in the Excel Sheet. I added a Pivot Table from PowerPivot into cell A1 and the only thing I put was that single
    measure (A2). To the right of that, I did =A2 and created an Excel Data Table. The title of that was "Last Refresh". Now, I could add that Data Table to the PowerPivot Model and into Power View. And then I hid that tab.
    The only downside to this method, is that if you're refreshing single tables at a time, you have to remember to refresh the Pivot Table when new data is added AND update the data in the model. I'm only connecting to one database, so I just choose
    "Refresh All" in Excel and it updates everything. It works perfectly! :)
    Well shoot, I even took a screenshot that helped explain everything, but it won't let me post it because my account isn't verified and it won't tell me how. If you have any questions, please let me know and I'll clarify!

  • Dividing two calculated fields

    Hi Folks,
    I am able to divide the two calculated fields viz(# Opportunities Created / # Opportunities Won) but I want to display "0.00" when both the numerator and denominator are "0"
    The calculation that I am using is
    1.0 * (COUNT(DISTINCT CASE WHEN Opportunity."Created Date" <= CURRENT_DATE AND Opportunity."Created Date" >= TIMESTAMPADD(SQL_TSI_DAY, -30, CURRENT_DATE) THEN Opportunity."Opportunity ID" ELSE NULL END) / COUNT(DISTINCT CASE WHEN Opportunity."Current Sales Stage" = 'Closed/Won' AND Opportunity."Modified By Date/Time" <= CURRENT_DATE AND Opportunity."Modified By Date/Time" >= TIMESTAMPADD(SQL_TSI_DAY, -30, CURRENT_DATE) THEN Opportunity."Opportunity ID" ELSE NULL END))
    Any suggestions??
    Thanks and Regards,
    Amit Koul

    Put a case when statement around it:
    case when (DIVISIONS.VAL1/DIVISIONS.VAL2) is null then 0 else DIVISIONS.VAL1/DIVISIONS.VAL2 end
    regards
    John
    http://obiee101.blogspot.com/

  • DAX Dynamic Banding | Calculated Member based on Calculated Field

    Good morning,
    I've created a Power Pivot model that measures the blood glucose levels of clinical patients at specific times of the day. The requirement is that this metric, let's call it GlucoseLevel, is always averaged as it wouldn't make sense to sum up the values.
    To meet this first requirement, I set the "Summarize By" property of the GlucoseLevel column to "Average".
    The second requirement is to band the GlucoseLevel values so that groups of people can be measured by this band rather than by the individual measure values. I created a banding table in Excel and then imported it into the Power Pivot model. The banding table
    has three columns (BandName, MinValue and MaxValue) and has the following values:
    VERYLOW: Min Value = 0; Max Value = 3.99
    OK: Min Value = 4; Max Value = 6.99
    WARNING: Min Value = 7; Max Value = 10.99CRITICAL: Min Value = 11; Max Value = 30.00
    It is at this point where I face my challenge. I have a GlucoseLevel measure and I have a banding table. Great. The challenge is: How do I create a calculated, dynamic
    member that will look at my GlucoseLevel measure (at whatever level), do a lookup to my banding table, and then return the "BandName" column from the Banding table at that specific level? So to clarify what I mean by level: I want to be able
    to view the bandings at Year level, or a Month level, or even at a week level. Then depending on what level I am at, my measure should have a Band associated to it.
    I've tried to solve this issue in a couple of ways:
    Attempt 1
    Create a calculated column in my fact table that contains a nested IF statement to manually band my GlucoseLevel values. This works fine if I view my data at the lowest level of granularity, however
    it does not work if I start looking at my data at the day, week, month etc. levels
    Attempt 2
    1.) Create a calculated field (not a calculated column) that averages my GlucoseLevel measure. This is cool because it will average my measure at whatever level I am viewing it at. Let's call
    this field Bob...
    2.) Band my measure Bob by creating another calculated field (called PatientBand). This field uses my banding table (described earlier) in conjunction with my calculated field Bob. This works perfectly, except for one big flaw: Excel sees this banding field
    as a measure, and not as something that I can use as a column / row...
    So my question is: Can I trick Excel into viewing my PatientBand calculated field as an attribute, and not as a measure? And if not, how do I get around this challenge? Here is the DAX formula that I used to create my second calculated field "PatientBand":
    PatientBand:=CALCULATE(
        VALUES (Bandings[BandName]);
        FILTER (
            Bandings; 
            Test[Bob] >= Bandings[MinValue]
         && Test[Bob] <= Bandings[MaxValue]
    Thanks!

    So there are 2 ways that I can think of for doing that.
    1) if you are only using MDX clients like Excel or Reporting services you can create a text based measure that returns the banding name. (Note that this sort of approach does not work at the moment with PowerView as it only displays numeric measures). This
    would effectively let you show a label next to a reading as opposed to moving the reading under a given banding column.
    Banding Name :=
    CALCULATE (
        VALUES ( Bands[BandName] ),
        FILTER (
            Bands,
            [Average of GlucoseReading] >= Bands[BandMin]
                && [Average of GlucoseReading] <= Bands[BandMax]
                && NOT ( ISBLANK ( [Average of GlucoseReading] ) )
    2) This next approach will show the results exactly as you had them in your sample screenshots. It just takes a slight bending of the DAX. I'm using a SUMX here, not because I want to sum anything, but because the "X" version of SUMX basically loops over
    every row in the specified table and sums the expression in the second parameter. I have setup the second parameter so that it only returns a single value for the average if it is in the appropriate banding. 
    Banded Average:=IF (
        HASONEVALUE ( Bands[BandName] ),
        SUMX(
            'Bands',
            IF (
                NOT ( ISBLANK ( [Average of GlucoseReading] ) )
                    && [Average of GlucoseReading] >= MIN ( Bands[BandMin] )
                    && [Average of GlucoseReading] <= MIN ( Bands[BandMax] ),
                AVERAGE(Readings[GlucoseReading]),
                BLANK()
    ,AVERAGE(Readings[GlucoseReading])
    http://darren.gosbell.com - please mark correct answers

  • Problem with Math In Calculated Fields

    I am calculating a group incident rate for data returned from
    a query. The formula is Number of cases multiplied by 200000
    divided by number of hours worked. Cases in my report is the
    calculated field: calc.CaseSum (the sum of cases for the group)
    Hours is calc.SumHours (the sum of hours for the group). The actual
    values for these variables (for the first group are 48 and 29427171
    respectively. When I create the following calculated field called
    rate using the formula: (calc.CaseSum * 200000) / calc.SumHours,
    Cold Fusion Generates a Runtime Error:
    Invalid ColdFusion expression in report. If the expression is
    a string, ensure that it is within quotes. Error: (calc.CaseSum *
    200000) / calc.SumHours is not a valid ColdFusion expression.
    If I use the constant value "29427171" as the divisor, the
    report works albeit only for the first group. Any ideas; is this a
    bug, or am I misusing the product?
    Addition: I forgot to mention I am using CF8. Also this
    formula worked fine as a Report Total before I introduced grouping
    and modified the calculated fields to reset on the change of a
    group.

    Sorry, I've been on another project for awhile. This problem
    will certainly be a "show stopper" for me if I cannot resolve it.
    As I mentioned in my original post, I used a constant in the
    formula in lieu of the variable and the calculation worked. This
    would suggest that CF does not have a problem with a large number.
    In spite of that reasoning, I tried Tony's suggested (thanks
    by the way!) with the identical outcome, only difference is the new
    formula is displayed in the error message.
    Tony, you also suggested that I set the variables using
    CFSET... How would I do this within the report writer environment.
    I had tried a similar approach: to perform half the calculation
    i.e. that within the parenthesis, and assign that value to a
    separate "calculated field: and then perform the rest of the
    calculation on that variable with the same outcome.
    I think that I may be dealing with a CF bug here, I'd like to
    find a workaround... I've noticed that CF8 has a new patch, perhaps
    after I apply it, I may be able to get this thing to work. I'm on
    another project right now so it will be a few days before I can
    test this theory, I report the result.
    Should this fail, and no one can come up with a workaround, I
    will report this to Adobe.

  • Running total of calculated field in pivot

    VERSION: ORACLE 11
    TABLE:
    create table chart_detail (
    DIS        NUMBER,
    BLD_MO VARCHAR2(7),
    BLD        NUMBER(10),
    RPLC      NUMBER(10));DATA:
    insert into chart_detail values (60,'2011-03',0,2);
    insert into chart_detail values (150,'2011-04',10572,0);
    insert into chart_detail values (120,'2011-04',26449,5);
    insert into chart_detail values (30,'2011-04',0,1);
    insert into chart_detail values (60,'2011-04',0,7);
    insert into chart_detail values (90,'2011-04',0,9);
    insert into chart_detail values (120,'2011-05',5714,0);
    insert into chart_detail values (90,'2011-05',24557,1);
    insert into chart_detail values (60,'2011-05',0,4);
    insert into chart_detail values (30,'2011-05',0,0);
    COMMIT;EXPECTED RESULTS:
         2011-04                    2011-05               
    DIS     RPLC     BLD     TBLD     IPTV     RPLC     BLD     TBLD     IPTV
    30     1     0     37021     0.03     0     0     30271     0.00
    60     7     0     37021     0.22     4     0     30271     0.13
    90     9     0     37021     0.46     1     24557     30271     0.17
    120     5     26449     37021     0.59     0     5714     5714     0.17
    150     0     10572     10572     0.59               0     
    180               0                    0     
    TOTAL     22     37021               5     30271          PROBLEM: I need to have a running total of IPTV like in the above example. I can get the IPTV for each DIS/bld_mo but I don't know how to get the running total of it. In the script below I just used an example where I tried summing the IPTV like was done for build. I know it can't be done that way because IPTV is a calculated field in the query but if I substitute "APR_IPTV" with the formula for IPTV I get an error that window functions aren't allowed here. I do not know a way around this. I commented out the bad piece of code.
    PROBLEM SCRIPT:
    WITH  pivot_results  AS
      SELECT    dis
      ,    NVL (apr11_rep,  0)  AS apr11_rep
      ,    NVL (apr11_bld,   0)  AS apr11_bld
      ,    NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS apr11_tbld
    ,      DECODE(NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(apr11_rep, 0)*1000/ NVL ( SUM (apr11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS apr11_iptv               
    ,      NVL ( SUM (apr11_iptv)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS apr11_tiptv  
      ,    NVL (may11_rep,  0)  AS may11_rep
      ,    NVL (may11_bld,   0)  AS may11_bld
      ,    NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0
                    )        AS may11_tbld
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_iptv
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_tiptv               
      FROM     chart_detail
      PIVOT     (  MAX (rplc)  AS rep
              ,  MAX (bld)  AS bld
              FOR  bld_mo   IN ( '2011-04'  AS apr11
                                             , '2011-05'  AS may11
    SELECT    CASE
            WHEN  GROUPING (dis) = 0
            THEN  TO_CHAR (dis)
            ELSE  'Total'
        END      AS dis
    ,    SUM (apr11_rep)  AS apr11_rep
    ,    SUM (apr11_bld)  AS apr11_bld
    ,    SUM (apr11_tbld) AS apr11_tbld
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (apr11_iptv)
        END      AS apr11_iptv
    ,    SUM (apr11_tiptv) AS apr11_tiptv
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (apr11_tpiptv)
        END      AS apr11_tiptv
    ,    SUM (may11_rep)  AS may11_rep
    ,    SUM (may11_bld)  AS may11_bld
    ,    SUM (may11_tbld) AS may11_tbld
    ,    CASE
            WHEN  GROUPING (dis) = 0
            THEN  SUM (may11_iptv)
        END      AS may11_iptv   
    FROM    pivot_results
    GROUP BY  ROLLUP (dis)
    ORDER BY  pivot_results.dis
    ;Thank you,

    Hi,
    So you know how to compute iptv for an individual row; the problem now is that you want to get a running total of iptv; is that it?
    The problem there is that computing iptv requires an analytic function, and analytic functions can't be nested. To get the results of nesting f (g (x)), where f and g are analytic funtions, you have to compute g in a sub-query, and then use the results as the argument to f in a super-query.
    Here's how to apply that to your situation:
    WITH  pivot_results  AS
         SELECT    dis
    -- April, 2011
           ,           NVL (apr11_rep,   0)  AS apr11_rep
           ,           NVL (apr11_bld,   0)  AS apr11_bld
           ,           NVL ( SUM (apr11_bld)
                                       OVER (ORDER BY dis DESC)
                          , 0
                          )               AS apr11_tbld
         ,      NVL ( 1000 * apr11_rep
                              / NULLIF ( SUM (apr11_bld) OVER (ORDER BY dis DESC)
                                          , 0
                   , 0
                   )               AS apr11_iptv
    -- May, 2011
           ,           NVL (may11_rep,   0)  AS may11_rep
           ,           NVL (may11_bld,   0)  AS may11_bld
           ,           NVL ( SUM (may11_bld)
                                       OVER (ORDER BY dis DESC)
                          , 0
                          )               AS may11_tbld
         ,      NVL ( 1000 * may11_rep
                              / NULLIF ( SUM (may11_bld) OVER (ORDER BY dis DESC)
                                          , 0
                   , 0
                   )               AS may11_iptv
           FROM     chart_detail
           PIVOT    (    MAX (rplc)  AS rep
                    ,    MAX (bld)   AS bld
                    FOR  bld_mo   IN ( '2011-04'  AS apr11
                                      , '2011-05'  AS may11
    SELECT    CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  TO_CHAR (dis)
                  ELSE  'Total'
               END      AS dis
    -- April 2011
    ,           SUM (apr11_rep)  AS apr11_rep
    ,           SUM (apr11_bld)  AS apr11_bld
    ,           SUM (apr11_tbld) AS apr11_tbld
    ,           CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  ROUND ( SUM (SUM (apr11_iptv))
                                          OVER (ORDER BY  dis)
                      , 2
               END      AS apr11_iptv
    -- May 2011
    ,           SUM (may11_rep)  AS may11_rep
    ,           SUM (may11_bld)  AS may11_bld
    ,           SUM (may11_tbld) AS may11_tbld
    ,           CASE
                  WHEN  GROUPING (dis) = 0
                  THEN  ROUND ( SUM (SUM (may11_iptv))
                                          OVER (ORDER BY  dis)
                      , 2
               END      AS may11_iptv
    FROM      pivot_results
    GROUP BY  ROLLUP (dis)
    ORDER BY  pivot_results.dis
    ;Output:
          APR11  APR11   APR11  APR11 MAY11  MAY11   MAY11  MAY11
    DIS    _REP   _BLD   _TBLD  _IPTV  _REP   _BLD   _TBLD  _IPTV
    30        1      0   37021    .03     0      0   30271    .00
    60        7      0   37021    .22     4      0   30271    .13
    90        9      0   37021    .46     1  24557   30271    .17
    120       5  26449   37021    .59     0   5714    5714    .17
    150       0  10572   10572    .59     0      0       0    .17
    Total    22  37021  158656            5  30271   96527As you can see, this is not quite what you wanted on the row where dis='150'. You asked for NULLS in the may11_rep, may11_bld and may11_iptv columns. You can get those results if you need them; just explain the rules that govern whether to display the values and when to display NULL.
    The way you posted the sample data and results, and the quantity of sample data were all excellent; it really helped me find a solution. Thanks.
    It would have also helped it you had explained how iptv is computed. Basically, iptv = 1000 * rep / tbld, right?
    It looks like most of this code:
    ,      DECODE(NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
                      OVER (ORDER BY dis DESC)
                    ,                 0),2
                    ))        AS may11_iptvwas a way of avoiding divide by 0 errors; it would have been helpful if you had explained that.

  • Date VS Date Time in Calculated Field

    I have a property for a patients records called Date of Birth. On the table defining it I saved it as a "date" type and It displays only
    the date on the screen as I would like. For some reason though when I needed a calculated field in the Medication record I added a property to the patient records table that concatenated two fields BirthDate and the Age. I used the following code and then
    added an other screen data item on the medication screen to pull the DoBA property up but got a Date/Time instead of just a Date.
    partial void DoBA_Compute(ref string result)
    // Set result to the desired field value
    result = "DoB:" + BirthDate + " Age:" + Age;
    //This is for the property "Date of Birth and Age"
    //I also used the following code to calculate "Age"
    partial void Age_Compute(ref int result)
    // Set result to the desired field value
    int age = DateTime.Now.Year - BirthDate.Year;
    if (BirthDate > DateTime.Now.AddYears(-age)) age--;
    result = age;
    Images

    I'm using cast instead of Convert.ToInt because the last round to value to upper int if value > 0.5 or to lower if value < 0.5 ( I don't remember now if equal goes to < or > ... read function doc ) while Cast to int do not round the value.
    In my code the day of the birthday
    still
    marks
    the
    previous
    age,
    from the
    day after
    one more year.
    by adding
    +
    1
    age
    increases
    by the
    day
    of the birthday

  • Some windows won't display?

    For some reason, some of my windows in dreamweaver will not display correctly, or much at all. For instance, when you first open dreamweaver and select "new dreamweaver site" all I get is a window that displays a few text fields and then whatever is behind that window (almost like the entire window is transparent, except when I move the window, it doesn't change to match what is behind it) My system exceeds the dreamweaver minimum requirements.
    I operate on windows xp
    I am running the trial version.

    I have, Thank you. I kinda sorta fixed the problem, I discovered that when I move the window off of the screen, it appears correctly, annoying but I dont know what else to do.
    Thanks alot for replying
    -Justin
    Date: Sat, 9 Oct 2010 06:18:32 -0600
    From: [email protected]
    To: [email protected]
    Subject: Some windows won't display?
    Have you tried reinstalling it?
    >

  • Button onclick not working in the calculated field

    Hi Everyone,
    I have to add the button in the calculated field through list definition. On click of button it should call the java script function. I can add the button but on click event is not working.
    this is my code:
    <Field Name="Accept" ID="{1F7328C7-D7F0-4B94-BB15-01859CD28CF2}" DisplayName="AcceptorDecline" Type="Calculated" ResultType="Number" ReadOnly="TRUE" JSLink="/_layouts/15/CCAR.SP.Common.Lists/UserRecertification/UserRecertificationScripts.js">
            <Formula>
              ="&lt;div id='divAccept'&gt; &lt;input type='button' name='btnAccept' id='btnAccept' value='Approve'
    onclick=""UpdateAcceptorDecline('"&amp;[URID]&amp;"','Approve')""/&gt;
              &lt;/div&gt;"
            </Formula>
            <FieldRefs>
              <FieldRef Name="URID" />
            </FieldRefs>
          </Field>
    Please help me on this issue. Thanks in advance.

    Hi,
    According to your description, my understanding is that you want to add button in a calculated field to call custom JavaScript function.
    I suggest you can use concatenate formula function to achieve it.
    You can add button use concatenate function like below:
    =CONCATENATE("<input type='button' name='btnAddToBasket' id='btnAddToBasket' value='Add to basket' onclick=","addToBasket('",[Document Name],"','",[Original],"')"," />")
    More information:
    How can I get a button in SharePoint to display info about a record?
    CONCATENATE function
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • How to move tracks from one album to another in itunes library?

    I have imported an album from my 'Vuze Downloads' folder in my 'iTunes library' but it appears in the library as three seperate albums. How to i get all the tracks into one album as they were meant to be? Cheers

  • Can't update my packages.

    When I run pacman -Syu it tried to update these packages arandr-0.1.6-1 bison-2.5.1-1 dbus-python-1.0.0-1 [removal] dwarffortress-0.34.11-1 fakeroot-1.18.4-1 filesystem-2012.6-2 firefox-13.0-1 gnutls-3.0.20-1 krb5-1.10.2-1 libgksu-2.0.12-5 linux-3.4.

  • Add page on logon page from third party system and from KM

    Hi All, I have one requirement where i need to embade other html file in logon page of Portal. Where the pages will come from othere server as well as from KM. VS

  • ORA-01747:

    select b.emp_category_id,max(a.basic_salary) from m_pis_employee a,m_pis_emp_category b where a.emp_category_id=b.emp_category_id group by b.emp_category_id; this one run successfully...but when i want to group by on all column present in table b the

  • I downloaded an audio book, received the invoice, i can't find the book

    i downloaded an audio book.  i have received the invoice.. i can't find the downloaded audiobook...I can see it as a sample in ibooks.