Stacked bar/null data bug.

Hi All,
Despite a number of posts reporting this bug in previous releases of Apex I am facing a simmilar issue as people before me...
I am trying to generate a stacked bar graph for a given period of time. To make my point clear let me provide an example:
1. I have a "project" table with info such as project_due_date and project_complete_date....
2. Now lets say I have 2 projects which were completed in JAN, and 3 projects which were completed in MAR (no projects were done in FEB)
3. Now the following SQL:
SELECT null LINK,
to_char(project_due_date,'MONTH') Month,
count(*) Late
FROM dm_project
-- Check for projects within due date (SLA)
WHERE project_complete_date < project_due_date
-- Group them by every month
GROUP BY to_char(project_due_date,'MONTH')
Will give me something like:
LINK MONTH LATE
- JANUARY 2
- MARCH 3
This will generate a graph which will display the number of projects that where completed within given time (< project_due_date).
BUT !
The above will only show 2 bars with January and March as X-Axis Labels... Obviously this is not a very representative way of displaying data.
Now, as a workaround I would like to build my queary so that it would return something like:
LINK MONTH LATE
- JANUARY 2
- FEBRUARY 0
- MARCH 3
- APRIL 0
-...etc...
- DECEMBER 0
So my question is finally this:
Is there anyway to get the months of the given year in SQL which I could use as my label value of the graph?
Kind regards,
Pawel.

Unfortunatelly... the above two queries still don't appear on the graph. This is very surprising to me as both statements return correct (I think) output:
Query 1
======
SELECT NULL AS link,
TO_CHAR ( TRUNC ( c.day, 'MONTH' ), 'MONTH' ) AS period,
COUNT(p.project_complete_date) AS late
FROM dm_project p,
dm_calendar c
WHERE
-- PROJECTS OUT OF TIME
NVL ( p.project_due_date, c.day ) < NVL ( p.project_complete_date, c.day + 1 )
AND c.day = TRUNC ( c.day, 'MONTH' )
AND TRUNC ( p.project_due_date (+), 'MONTH' ) = TRUNC ( c.day, 'MONTH' )
AND c.day >= '01-JAN-06'
AND c.day <= '31-DEC-06'
GROUP BY TRUNC ( c.day, 'MONTH' )
ORDER BY TRUNC ( c.day, 'MONTH' )
Gives output:
==========
LINK PERIOD LATE
- JANUARY 0
- FEBRUARY 0
- MARCH 0
- APRIL 0
- MAY 0
- JUNE 0
- JULY 0
- AUGUST 0
- SEPTEMBER 0
- OCTOBER 0
- NOVEMBER 2
- DECEMBER 1
Query 2
=======
SELECT NULL AS link,
TO_CHAR ( TRUNC ( c.day, 'MONTH' ), 'MONTH' ) AS period,
COUNT(p.project_complete_date) AS late
FROM dm_project p,
dm_calendar c
WHERE
-- PROJECTS ON TIME
NVL ( p.project_complete_date, c.day ) < NVL ( p.project_due_date, c.day + 1 )
AND c.day = TRUNC ( c.day, 'MONTH' )
AND TRUNC ( p.project_due_date (+), 'MONTH' ) = TRUNC ( c.day, 'MONTH' )
AND c.day >= '01-JAN-06'
AND c.day <= '31-DEC-06'
GROUP BY TRUNC ( c.day, 'MONTH' )
ORDER BY TRUNC ( c.day, 'MONTH' )
Gives output
=========
LINK PERIOD LATE
- JANUARY 0
- FEBRUARY 0
- MARCH 0
- APRIL 0
- MAY 0
- JUNE 0
- JULY 0
- AUGUST 0
- SEPTEMBER 0
- OCTOBER 0
- NOVEMBER 1
- DECEMBER 1
Can anyone tells me why I am not able to simply display both series on a stacked bar graph?
Message was edited by:
padmocho

Similar Messages

  • BIP 11.1.1.7 - Stacked Bar chart data label not visible in pdf

    Hi all,
    I have a report built with the online editor. This contains a stacked bar chart with percentage values in a repeating section and I made the property DataVisible=true.
    When I view the report in interactive mode it all works: I can see the data label for every value of the parameter but when I view in any other format (PDF, PPT, ecc..) the data labels are visible in the first chart (for the first value of the parameter) while in the other charts they aren't. This doesn't happens for other types of chart, for example with a pie chart.
    Can someone help me or tell if it is a bug?
    Thanks,
    Micaela

    Hi Mitalee,
    Would you please check the PAM at https://websmp108.sap-ag.de/~sapidb/012002523100018972812014E
    On page 11 it says 64 bit IE11 is not supported; is your IE11 32 bit or 64 bit?

  • Help need in Stacked bar vertical - No data found message

    I am using Stacked bar vertical with the 3 series. The problem is if any one of the series returns zero rows for the query it displays the No data found message for all the series and blank graph is there on screen with just x and y axi with the name.
    The result i want is if any series in the graph returns zero row for the query it should executed the other series and show the graph accordingly for the series fetch the data.
    all these queries are returning the data when run on database instead of one.
    Can anyone help me for this?

    Hello Sunil,
    you may find some info here:
    Document on Multiple Series SVG Line Chart
    Generally speaking, if you want your queries to return "dense" data, you must ensure that a zero (Y value) is returned against each X value. If your queries return no rows, it means you must "artificially" create values, probably rewriting the queries with an outer join to a table returning the desired X values and using NVL function to replace null (Y) values with zeros.
    Also, be careful with the order of X values, it really matters, otherwise you'll get skewed charts!
    Bye,
    Flavio

  • Using stored parameter from data control class with stacked bar-graph

    Hi folks,
    I'm relatively new to ADF & EJB so I want to apologise in advance if this question seems rudimentary to many of you.
    Edit:  I should have mentioned that I'm using JDeveloper 11.1.1.5
    I'm having a hard time determining how to retrieve the value from a variable to be assigned to a property of the bar graph I'm trying to display on my JSF page.
    I have tried to briefly summarise the logic below for reference.
    I have a data control class (ActivityChart) that includes a method "getActivityDetail" returns a List of custom Objects (ActivityDTO) that are the underlying data for my bar graph.
    public class ActivityChart {
        private Double axisScale;
        public ActivityChart() {
            super();
            axisScale = 0.0;
        public List<ActivityDTO> getActivityDetail(List<String> businessUnits) {
            List<ActivityDTO> returnNewList = new ArrayList<ActivityDTO>();
            List<TransactionDTO> dataList = new ArrayList<TransactionDTO>();
            TransactionSessionBean transBean = lookupTransactionSessionBean();
            if (businessUnits != null && !businessUnits.isEmpty()){
                dataList = transBean.getActivityData(SystemUtil.getCurrentUser(), businessUnits);           
                returnNewList = processTransactions(dataList);
                axisScale = calcAxisScale(returnNewList);
            return returnNewList;
    ...The TransactionDTO object is basically a mirror of the entity object to store the fields from the queried db transactions.
    The ActivityDTO object contains a String value (x-axis label) and 3 Double values for the values required for the bar graph.
    What I'm trying to do is dynamically set the scale for the 2 y-axes (I'm using a dual-axis stacked bar graph) because the auto calculated values are not aligned.
    Right now I've got the two relevant elements of the bar graph hard-coded with a specific axis value:
    <dvt:y1Axis axisMaxAutoScaled="false" axisMaxValue="100.0"/>
    <dvt:y2Axis axisMaxAutoScaled="false" axisMaxValue="100.0"/>.
    The value I want to use for the Y-axis is calculated and stored in the "axisScale" variable in the above class.
    Really at a loss of how to move forward from here.
    Would very much appreciate any guidance/direction offered.
    Thanks,
    Karim
    Edited by: 973742 on Nov 28, 2012 8:12 AM

    Looks like I may have found the answer!
    I had to set up the variable in the bindings for the page and then reference the variable from the binding and add the property inputValue.
    ie. value="#{bindings.axisScale.inputValue}"

  • Stacked Bar Chart - no data found

    I have a page with a report and a stacked bar chart. They are both based on the same query condition. When I call the page the report runs and shows the result but the chart shows "no data found" message. After pressing the submit button the chart finaly shows the result. Any clues what the problem could be? Can I create a process that would submit the page when I open it? Eventually only once per session?
    This is a funny behavior. It occurs only sometimes. I am not able to reproduce it by will.
    Denes Kubicek

    Hello Flavio,
    I know why this happened in my case - I added an additional condition using a page item as a bind variable to my ...WHERE... statement. This item had a default value.
    After that the chart showed no data found but everything else worked fine. As soon as I comment out that condition (I have plenty of similar conditions in that statement and they work), the chart would show as expected. It was like the chart select statement would see the item empty (NULL) but the report using the same conditions would find the default value in it.... after submitting the page, it worked fine for the rest of the session.
    Just now, I added a computation process for that page item, to set it on a static value (the same I had as the default value) - On Load Before Header. I also added a condition to it to fire only if the value of the item is NULL, to avoid unnecessary processing. After this my chart showed what was expected.....
    I am sure your problem is of a similar nature. You need to check your select statement I suppose.
    Denes Kubicek

  • Workaround for NO DATA FOUND in stacked bar chart?

    Hello, Ive got a stacked bar chart in the making, when one of the series doesnt have data, the whole chart show the no data found message but not the other series that do have data. Is there a workaround for this? can I catch the exception in the Series Query? Or is there any other workaround someone has tried with success???
    thanks for any help or suggestion!!!

    Ok, figured out a workaround based on my rusted SQL memories (its probably not the most efficient way to go), made a view like this:
    CREATE OR REPLACE FORCE VIEW "VISTA1" ("NOMBRE", "TIPO_LOCAL", "TIPO", "FECHA", "OPCIONAL") AS
    select USUARIO.NOMBRE, USUARIO.TIPO TIPO_LOCAL, CONSUMO.TIPO, CONSUMO.FECHA, CONSUMO.OPCIONAL
    FROM USUARIO
    LEFT JOIN CONSUMO
    ON USUARIO.ID_USUARIO = CONSUMO.USUARIO_ID_USUARIO
    on this view, i made individual selects and UNIONed them for a comeplete table, with null values being zero, just what was needed:
    select null link,
    LOCAL,
    total "CANTIDAD"
    FROM
    select
    count(A.TIPO) TOTAL, 'SIGO SAMBIL' LOCAL
    FROM VISTA1 A
    where A.tipo='3 PACK' AND A.NOMBRE = 'SIGO SAMBIL'
    UNION
    select
    count(A.TIPO) TOTAL, 'A GRANEL' LOCAL
    FROM VISTA1 A
    where A.tipo='3 PACK' AND A.NOMBRE = 'A GRANEL'
    etc.....
    for each series, i then had to change the A.tipo value to whatever the new series should be.
    regards,
    Mariano.

  • Xcelsius Stacked bar (manual scaling ) seems to have bug!

    Hello team,
    Need some help.
    I have an excelsius stacked bar chart with 2 series, each displaying some start date and end date of projects.
    Eg:  series1 shows a list of column values for 'start dates'. ( within excel portion)
           Series 2 shows a list of column values for 'end dates' of projects
    Now when i display the chart with X axis having two series data, and Y axis labels displaying corresponding project names.
    I see the start dates and end dates correct when using 'Auto X axis' scale option ( Behavior - > Scale ), but then the scale value
    is too big, i mean it displays dates from mid 19 century to mid 20th century ( where in the date range falls between 2007 - 2022)
    So, we decided to go for 'manual scale option' ( Behavior - > Scale ), now the problem starts,
    Manual scale option will not display the end dates range correctly, it stretches the bar till the max date value (for all projects)
    (which seems to be bug).
    The same data which displays correct when in auto scale options will no more display accurate.
    I even tried using third series to obscure the second series values, however the 3rd series will not even shows up in manual scale. ( though auto scale is working good for 3rd series as well )
    Note: The 'end date' values are calculated using the 'Start dates' with a help of a formula.
    Please have a look at this scenario
    I can send the xlf file to you.
    Appreciate your help.
    -Ravi

    I got it working now,
    Stacked bar chart was adding the start dates and end dates for second series and projecting bars accordingly.
    Well, i made some calculations in the excel sheet to correct it.
    It's working now,
    Thanks
    Ravi

  • Stacked Bar Chart with data from a Web Service

    Hi,
    I'm working on Dashboard Design (version 14.0.1.287) and I'm trying to create a chart linked to data from a webservice.
    With a Year in input, my webservice gives an Amount per Cities and Products
    Data retrieved look like this (Sheet1) :
    Paris          Tablets          45
    Paris          Laptops          12
    Paris          Cellulars          89
    New-York     Tablets          56
    New-York     Laptops          36
    New-York     Cellulars          1
    Londres          Tablets          150
    Londres          Laptops          3
    Londres          Cellulars          45
    Then I use a Pivot Table (created manually in Excel) looking like this (Sheet2) :
                   Tablets     Laptops     Cellulars
    Paris          45          12          89
    New-York     56          36          1
    Londres          150          3          45
    The chart is a Stacked Bar Chart plugged on the previous Pivot Table
    I create 3 series (one per Product), values (X) are set with Amount
    Category labels (Y) are set with Cities
    The goal is to have a dynamic chart (series and categories must update if a new city or a new product appears)
    So my question is : how can I set up the chart directly with data retrieved from webservice on Sheet1?
    Thx a lot !
    Nicolas
    Edited by: nicolasheurtevin on Sep 14, 2011 4:58 PM

    hi
    First thing , bad news if you are using .Net framework 1,
    just forget it, Flex 2 doesn't work well with framework 1, but 2nd,
    good news, if you want to use webservices, you'll have to make an
    array of objects on .Net Side and send it as objects to flex, i saw
    an example on the net but i can't seem to remember where, on the
    other hand,if you want to simply use, like i do, HTTPSERVICE its a
    very nice way to talk with .Net and you can see my example here
    http://flex1-for-dummies.blogspot.com
    By the way, in your code, you have a request tag , but you
    aren't requesting anything, because if you were you would have to
    make like this
    <mx:request>
    <Artist>{yourinputtext.text}</Artist>
    </mx:request>
    So if you don't have an input text, you don't need a request
    tag, only the operation.

  • Stacked bar chart showing zeros when there is no data

    Hi,
    I am developing a stacked bar chart which plots month vs sales of 3 different products.
    I am showing data points and the total sales on chart.  Every thing looks good except the zeros displayed on the chart if there are no sales for a product for a particular month... how to get rid of these zeros ? i mean how to display the value only if there is some data ?
    Thanks

    Sounds like you have a left outer join from your product table to the sales data. Thus product is listed even when no data present.
    Try changing join to Equal
    Ian

  • I need a stacked bar graph stacked but overlaying data help please

    Hi,
    I have a requirement to change an existing combination graph.
    Currently we use a combination graph that has a bar that shows the usage accross a number of weeks, with a line that shows total available over the top. So the customer can see what they have used in a week against themaximun it could be used in that week.
    Unfortunatley our customer would like this changes to a single bar graph that shows the usage and then if the total available is more than the usage (it is sometimes the same but never less) then this should be added to the bar graph to increase the bar in a different colour.
    I have looked at Reports 10g and the stacked bar graph seems perfect but this adds the two values together and not just the increase. I know i could minus one from the other but with the way my data is structured in the data model this could be a pain as they are linked via a data link in the data model and also seems a bit of a work around. Is there no way to have a overlay on the stacked graph or is there another way to achieve this that i cant see.
    Thanks

    I was able to figure it out.
    Instead of using creating the dataset using:
    CategoryDataset datasetWorkload = DatasetUtilities.createCategoryDataset()
    if a 'DefaultCategoryDataset' is used, the values to be displayed can be customised:
    DefaultCategoryDataset result = new DefaultCategoryDataset();
    result.addValue(200.0, "Allocated", "Jan 04");
    result.addValue(500.0, "Allocated", "Feb 04");
    result.addValue(10.3, "Over-Allocated", "Jan 04");
    result.addValue(16.2, "Over-Allocated", "Feb 04");
    Thanks for your time, users: wpafbuser1 and practissum.

  • Numbers Charts:  Stacked bar chart with two sets of data

    Hi....newbie with first post
    I'm trying to create a stacked bar chart with two lots of comparative data.
    So, there is Basic + Overtime for April 2010 as one stack (ie the basic is one colour, stacked on top is the overtime in a different colour)
                      Basic + Overtime for April 2011 next to it.
    I can get April figures next to one another as four separate columns (2 x basic, 2 x overtime), or I can get all four figures in a single stack, but I can't to two columns (one for each year) of basic and overtime.
    Any ideas?

    UK,
    What you are trying to do will require that you interleave the two sets of two-series data into one longer two-set series, and then plot just the one pair of series. Clear as mud?
    What I'm saying is that you have to fake out the program into thinking that you have just two sets, not four.
    You will have one series that has, for instance Apr 2010 Basic, Apr 2011 Basic, May, 2010 Basic, May 2011 Basic, etc.. This other series in that chart will have Apr 2010 Overtime, Apr 2011 Overtime, May 2010 Overtime, May 2011 Overtime, etc.
    The bad thing here (I'll anticipate your first complaint) is that 2010 and 2011 data will have the same color for Basic and another color will be assigned for both 2010 Overtime and 2011 Overtime.
    To get separate color sets for 2010 and 2011 data pairs, you will have to create two charts and overlay them. Both charts would be built in the alternating year format described above, but in one chart all the 2010 data would be blank and in the other chart all the 2011 data would be blank, leaving spaces in the chart for the data from the other chart to nest in.
    Jerry

  • Problems with date in stacked bar charts

    I am having a lot of problems trying to generate stacked bar charts where one of the fields is a date. Using the chart generator in word, the stacked bar charts work perfectly if I use (for example) Labels=Country, Series=Product, Values=Quantity(Sum) . The correct quantities are shown.
    However if I change Country to Expiry (date), the quantities are all wrong ? Such that I have no idea how it is obtaining the values.
    The generated code is :
    <Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20"
           seriesEffect="SE_AUTO_GRADIENT" graphType="BAR_VERT_STACK">
      <Title text="" visible="true" horizontalAlignment="CENTER"/>
      <LocalGridData colCount="{count(xdoxslt:group(.//G_MED,  'EXPIRY'))}"
                     rowCount="{count(xdoxslt:group(.//G_MED,  'PRODUCT'))}">
        <RowLabels>
          <xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              select=".//G_MED" group-by="PRODUCT">
            <Label>
              <xsl:value-of select="current-group()/PRODUCT"/>
            </Label>
          </xsl:for-each-group>
        </RowLabels>
        <ColLabels>
          <xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              select=".//G_MED" group-by="EXPIRY">
            <Label>
              <xsl:value-of select="current-group()/EXPIRY"/>
            </Label>
          </xsl:for-each-group>
        </ColLabels>
        <DataValues>
          <xsl:for-each-group xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              select=".//G_MED" group-by="PRODUCT">
            <RowData>
              <xsl:for-each-group select="current-group()" group-by="EXPIRY">
                <Cell>
                  <xsl:value-of select="sum(current-group()/QUANTITY)"/>
                </Cell>
              </xsl:for-each-group>
            </RowData>
          </xsl:for-each-group>
        </DataValues>
      </LocalGridData>
    </Graph>Any help would be greatly appreciated !
    Cheers,
    Brent

    Thank you all for your replies so far:
    @Alex: You are right, using your short script in sqlplus gives me also 2009 as result
    So, I am now posting the essential excerpts of the procedure because the whole one is to large:
    function insert_szrl (my_fremd_name varchar, my_elementadresse varchar,
    my_zeitstempel varchar, my_wert float,
    my_status varchar, my_zyklus varchar,
    my_offset integer,
    my_quelle varchar, my_nzm_daten integer) return integer is
    begin
    my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24;
    if my_zyklus = 'mm' then
    my_zeitstempeldate := add_months(to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy'),-1) +1 + (my_tageswechsel+1/24);
    my_days := to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy') - add_months(to_date(last_day(to_date(my_date, 'dd.mm.yyyy')), 'dd.mm.yyyy'),-1);
    my_year := to_number(to_char(to_date(my_date,'dd.mm.yyyy'), 'yyyy'));
    ptime.umschalttage_tuned (my_year, my_ws, my_sw);
    end if;
    While debugging the complete procedure I see since the start only a date which looks like '01.04.2009 07:00:00'
    Edited by: user10994305 on 19.05.2009 15:58
    Edited by: user10994305 on 19.05.2009 15:58

  • Suppress zero values for data labels in a stacked bar chart.

    I've seen this question asked before, but I can't seem to find anyone who knows how to do this.  I've made a stacked bar chart from a crosstab result, and I don't want to show labels that have a zero value.  This seems like others would have this same issue as it can really clutter up a chart.  The link below shows my chart.  I am trying to remove the labels that say "On-PW 0"
    http://i1199.photobucket.com/albums/aa472/gno722/question%20examples/crystalquestion.jpg

    the steps below will work on a regular chart..not sure about stacked...
    1) in Preview mode of the report click on a Y axis value and go to Data Y Axis Options
    2) go to Scale and set  a Minimum Value of .001
    3) check the Don't Draw Out Of Scale Values
    cheers,
    jamie

  • Show Data labels on stacked bar chart

    Hi All:
    I am trying to show an inside data label on a stacked bar chart.  For some reason Flex 4 does not like labelPosition="inside" in the mx below.   Thanks  Bob
    <mx:BarChart 
    id="ProxChart" x="85" y="76" height="192" width="630" type="stacked">
    <mx:horizontalAxis>  
    <mx:LinearAxis maximum="20"/>  
    </mx:horizontalAxis>
    <mx:series>
    <mx:BarSeries id="MySeries" displayName="Test" xField="" labelPosition="inside"/>

    This will do it.
    import mx.charts.*;
    private function myLabelFunction(element:ChartItem, series:BarSeries):String
      return(element.item.toFixed(1));
    <mx:series>
      <mx:BarSeries id="MySeries" displayName="Test" xField="" labelPosition="inside" labelFunction="myLabelFunction"/>

  • When I try to use 'Stacked Column Bar'. with data assigned in the graphs, and want to see it in the 'Preview' mode in Xeclsius, I unable to see the graphs apart from the Axes ans Series Value, the graphs becomes totaly invisible why So ?

    When I try to use 'Stacked Column Bar'. with data assigned in the graphs, and want to see it in the 'Preview' mode in Xeclsius, I unable to see the graphs apart from the Axes ans Series Value, the graphs becomes totally invisible why So ?

    Hi Ranendra,
    For basic understanding of Dashboards and Models you can use standard Templates or samples which ll come along with dashboard designer(Formly Xcelsius) installation.
    For path   File-->Templates(or Samples).
    Under Templates you ll have different categories and for each you ll find the dashboard Templates.
    Regards,
    Venkat P

Maybe you are looking for

  • IPod cannot be synced because external hard drive could not be read

    I moved my music folder to an external hard drive to create space on my laptop, and changed the location under Preferences / Advanced. Since I did this, my iPod trys to automatically sync but gives the error message "The iPoD "[name]" cannot be synce

  • LDAP AUthentication in obiee11g

    Dear Experts I need to intergrate AD (LDAP) with obiee11.1.1.6 . Can I use teh rpd to create a new LDAP and then import all the user and create an initilization block to authenticate user. OR I will have to do it in Weblogic console. using the link -

  • Where Clause in Logical Table Source

    I have a dimension table joined to a fact table in BMM Layter. I would like to apply a filter in the where clause of the dimension table. Does the fact table also require the same exact filter to be applied in the where clause.

  • AIAB- maximum number of distribution rule gruops has been reached

    Hi experts, I am getting the error u201CMaximum no. of distribution rule group has been reachedu201D, while running Transction code - AIAB for distribute asset for the asset capitalization from AuC. Anybody facing this type of error earlier if yes ho

  • Mapping Objects Missing in ESR

    Hi All, currently in my PO dev system mapping objects are missing Service Pack Version: 05 Release:NW731EXT_10_REL. please advice me how to do it .