Problem with stacked bar query

Hello,
I tubbing a while on this already and probably the answer is right there.
I have table with date,product,qty column and I want a stacked bar with the sum of quantity for each product for a certain period.
so period is the label but how can I created the sum(qty) for each item and display it in a stacked bar?
Thanks for the help

Hi Irvine,
If you want to try and make a stacked bar chart, you will need to add a new serie for each product you'd like to see in your chart. I don't see any other way to make this generic for each product in your products table.
But if you like to make a new serie for each product i'll give you a small example on how you can do this.
First create your chart and fill in a query for your first product:
example:
select product,substr(p_date,4,3),sum(quantity)
from table
where lower(name) = 'keyboard'
group by product,substr(p_date,4,3)
This will give you as result: the sum of the quantity for a certain month for the product 'keyboard'. This will be your first serie.
Now go to the chart attributes and choose 'add series', now you can add the serie for the next product, f.e.:
select product,substr(p_date,4,3),sum(quantity)
from table
where lower(name) = 'mouse'
group by product,substr(p_date,4,3)
Do this for every product you'd like to add to your chart.
Grtz,
Tuur
Message was edited by:
HENDRTU

Similar Messages

  • Problem with Stacked Bar

    I need to show details about messages transactions.
    I decided to use a Stacked Bar chart to view present number of trans' of different types by their date.
    I use this query in all the series:
    select null link, sd label, c value
    from (select trunc(STARTDATE) sd, count(TRANS_ID) c
    from TRANSACTION
    where ERROR = 'OK' and MSGTYPE = 'THE_MSG_TYPE_VALUE'
    group by trunc(STARTDATE)
    order by trunc(STARTDATE) )
    the chart is presented, and i thought it's correct. apparently not.
    in some msg types it placed its colored column in wrong date (i think it's because it's the only type that has transaction/s in this date). it simply was added to the other columns serially.
    the correct (and expected) result was to place it in separate column and not to add it to the other series.
    maybe i should add something in the query. if someone encountered this problem, i'd be happy to take advices.

    Here's my result with six values in a single series. I double clicked the last bar to change its colour from the default grey (which was visible) to magenta.
    Numbers 2.0.3, iBook G4, OS X v10.4.11
    (Shot in the dark:) Try double clicking the value label, then changing the order position of this item.
    Regards,
    Barry

  • Problem with Stacked Bar Chart

    I have a problem with a stacked bar chart in Numbers 09. My chart is a single series with 6 categories. All of the categories have different values. The first 5 categories display correctly. However, the last category does not display in the color its supposed to, but rather shows up as white/background instead of the grey color shown on the legend. However, the value label is displayed in the proper place.
    When I select other chart types (pie, regular bar, or regular column) the category shows up like it's supposed to.
    This is kind of annoying since I would rather use stacked bar instead of a pie chart. Is there an upper limit on the number of values it can display as a stacked bar chart? Is this just a bug? Thanks!

    Here's my result with six values in a single series. I double clicked the last bar to change its colour from the default grey (which was visible) to magenta.
    Numbers 2.0.3, iBook G4, OS X v10.4.11
    (Shot in the dark:) Try double clicking the value label, then changing the order position of this item.
    Regards,
    Barry

  • Problems with stacked bar chart in Java SDK and CRDesigner

    Hi @ll,
    I have an issue with the rendering of stacked bar charts through the Java SDK and the CRDesigner. unfortunately, my research in this forum and with the help of aunt google didn't lead to success.
    These are my problems:
    I have a  stacked bar chart which, when datasets/stacks increase in number per bar, displays errors:
    1.)  the single stacks of the bar merge together randomly and form bigger stacks with the sum of the singles. the information of  single stacks gets lost in the bar.
    2.)  the total sum of all singles is bigger than the maximum value on the y-axis displays. thus, the scaling is wrong.
    1.) appears in the CRDesigner as well as in the Java SDK
    2.) only occurs in the Java SDK
    Is there any trick to turn the random merging of slices off?
    Is the false scaling a known issue and is there a bugfix/workaround?
    many thanks for all advice
    Tom

    hi folks,
    i found the answer to the above problems:
    when you specify the recordfields that are responsible for the change to the next stack or bar, the 'stack' fields have to be unique.
    in my case i evaluated durations in msec (as stacks) from different devices (as bars). randomly i had the same durations for one device. what happens is, that CR does not notice a change and accumulates to the first stack with the same duration.
    surprisingly this also seems to derange the axis scaling. fix the problem by simply using an overall unique recordfield like rownum or a formula that forms the current timestamp to text as identifier for the stacking.
    cheers
    .t

  • Problem with stacked bar chart label

    Hi,
    According to page export sql file I'm using APEX version 2.0.0.00.49.
    I'm trying to make stacked bar chart but no matter what I do I can't have series label to be displayed within the chart area.
    Is it a bug fixed in a latter version of APEX ? Is there something particular to do (for example an option to thick) to have them displayed ?
    thank you for help.

    The answer is yes there is something particular to do.
    If you want your stacked bar chart to display well all series have to be the same and not null.
    So you must write outer joined queries with nvl in the select.

  • Chart - problem with stack

    Hello,
    Ive got 3 problems with stack plots:
    1. In the legend, the first value of table is the last one, why?
    2. Always when i remove one value(in this case i turn off button), the last chart is remove
    3. When I turn off the second button(rest is on), the plot name in legend is doubled.
    Does anyone have an idea what i can do with this?
    thanks for any answers.
    Solved!
    Go to Solution.
    Attachments:
    Desktop.zip ‏24 KB

    Well, you simply need to code it differently.
    Try this:
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    top-levelMOD2.vi ‏13 KB

  • Problems with Input Ready Query

    Hello All,
    I'm facing problems with input ready query for BI IP.
    I've created the input query on aggregation level and maintianed all the planning settings.  It is not allowing me to edit, when i'm attaching in the web template.
    I also attached a button copy function, and i'm able to execute it and save it, but it not allowing me to change manually.
    I also enabled the 3rd option for keyfigures...data can be changed with planning functions and user input.
    Please help me in this regard.
    We have just started the development of BI-IP, please suggest me if there are any notes to be applied.
    Regards
    Kumar

    Hello Johannes,
    Yes I've set to the finest granularity...even if it is Only one characteristic and one key figure without any restrictions...
    I've checked even planning tab page under properties...it is also fine..
    But still it is not allaowing me to go to edit mode...this is a fresh instalation and the query i'm working is the first one...
    Please suggest me if there are any notes to be applied, we are on Support Pack 10.
    Regards
    Jeevan Kumar

  • Big problem with status bar legibility in IOS 7.0.4

    Hi, i'm adressing this problem to Apple. I recently update my iphone 4s to ios 7.0.4 and i have found some problems with status bar visibility in certain apps. Ex: in Photo app, the status bar is dark and it is unreadable, same in Lockscreen in Emergency menu, in menu when someone calls or you call someone and in Camera app the status bar is black and overlaps with the text and option buttons of the app. Please fix this as soon as possible because it is very frustrating.Sorry for bad english :d

    There is no Apple hear in this user to user forum.
    YOu can send feedback here http://www.apple.com/feedback/

  • SVG CHart error ORA-20001 with Stacked Bar Chart HTML DB 1.6.0.00.87

    Hi,
    during I put a How-To into execution (How To Create a Stacked Bar Chart) I'll get the following error code:
    SVG Chart error:ORA-20001:line_Chart error:ORA-20001:
    get_data error:ORA-20001:Parse error:ORA009
    (see http://www.oracle.com/technology/products/database/htmldb/howtos/index.html)
    This Situation occurs when i add a second series to the
    chart. The first series works fine. I've used the following SQL-Statement:
    select null l, sales_month, revenue from (select to_char(o.order_timestamp,'Mon YYYY') sales_month, sum(oi.quantity * oi.unit_price) revenue, to_date(to_char(o.order_timestamp,'Mon YYYY'),'Mon YYYY') sales_month_order from DEMO_PRODUCT_INFO p, DEMO_ORDER_ITEMS oi, DEMO_ORDERS o where o.order_timestamp <= (trunc(sysdate,'MON')-1)and o.order_timestamp > (trunc(sysdate-365,'MON'))and o.order_id = oi.order_id and oi.product_id = p.product_id and p.category = 'Audio' group by to_char(o.order_timestamp,'Mon YYYY') order by sales_month_order);
    Please help.
    Regards
    Detlev

    Well,
    I've just been struggling for a couple of hours with a cluster bar chart giving the same problem.
    The problem is definitely with "ORDER BY".
    I guess the graphing chart is taking the sql query as a string and then does some other manipulation on it which ends abnormally when you include the order by clause.
    I presume that if you embed the query in a
    SELECT * FROM (<actual query with order by>)
    it might mitigate the problem.
    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}"

  • Problem with SCROL BAR

    In my form i have fields in tabelar view and i have scrol bar.
    When the query has been executed, I want to see all of data in my form and I offcourse must to scrol down, but when I receive a lot of data my action with scrol bar occure system block, CPU time increase and I must to terminate(with end task) the aplication.
    This happened, not allways, in Forms9i and Forms6i.
    Is this some oracle bug or exist some developers trick to solve this problem?
    Thanks, it's very imported to us!

    this may be affected by many factors assuming your form coding is good.
    you may first try to set the block's QUERY ARRAY SIZE to see if it helps. if you allows DML, then the DML arrary size too, but you need to balance them by many trials. In fact, if you get a powerful server/client machine, that helps too.

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • Problem with unit in Query

    Hallo Experts,
    We encounter a problem with unit in our Query.
    Szenario:
    We use the Unit like PC, SET in Query.
    In Table T006 those Units have value 0 in the field ANDEC, so they will be rounded up and rounded down in Query.
    Our Problem is some Queries need the rounding up and down but others don't need this function.
    Where and how should we change to solve the problem.
    thanks & Best regards

    hi,
    if you want to control the rounding off while unit conversion you can do it from SPRO
    In the BW system, goto SPRO -> SAP NetWeaver -> General Settings -> Check Units of Measurement -> Units of Measurement -> Choose the unit corresponding to 'KM' -> Click on 'Details' button in the toolbar.
    Look the field 'Decimal Pl rounding'. Change this to 3 or whatever value you choose and see if it works.
    in above link i have taken example of KM, you need need to select the required unit.
    let us know if this is solves your problem. I am not sure if this can be done for individual queries but this is controlled by UOM wise as mentioned above.
    Regards,
    Rk.

  • Problems with scroll bars in list view

    Hello,
    I am using Xcelsius 2008 (Build Number 12,2,166).  I am still having trouble with scroll bars on my list view control. Other list views in my dashboard seem to be ok. It seems that this list view is not ignoring the blank cells in my excel file. I have gone through many things to correct this problem. I have added a new list view, I have copied other list views that work correctly but still no success. It seems that the "Ignore Blank Cells" property is not working correctly. Does anyone have a solution for this?
    Much Thx!

    Hi Yusufel,
    Please check the data whether the cells are really blank or having any space which could not be seen, etc.
    With best wishes
    BaaRaa.

  • Problem with Stacked Columns in Business Graphics

    Hi,
    Has anyone used the stacked columns chart type in business graphics?  Am facing a problem with this.
    I am using the SimpleGraphics example demo with 2 dataseries, the values ranging from 0-10.  It works fine if the chart type is Columns (this is default).  When I change the chart type to stacked_columns, the graph goes for a toss.  The y-axis range automatically changes to 0-1 (values as 0, 0.2, 0.4 ... 1.0) and it does not display stacked columns as expected.
    Is there any specific property(s) that need to be set for this chart type?
    Appreciate any quick response.
    cheers,
    Vittal

    Hi friend,
    See the link below it is having the solution of hiding the columns in smart forms
    Hide table columns in smart form?
    Create a table to display your values with 12 col and hide the columns based on the idea provided in the link above.
    I think this will solve your issue if you still have queries please revert back to me i will help you.
    Thanks,
    Sri Hari

Maybe you are looking for

  • ICal will not open and crashes.

    Process:         iCal [7550] Path:            /Applications/iCal.app/Contents/MacOS/iCal Identifier:      com.apple.iCal Version:         5.0.3 (1605.4) Build Info:      iCal-1605004000000000~3 Code Type:       X86-64 (Native) Parent Process:  launch

  • JRE 1.5.0_11 Startup Error with MS Windows Vista. Please help!

    Hi there, I am hoping that someone can help me with this very confusing problem. A friend of mine made a program for me last month using java. It works brilliantly on computers running MS Windows 2000 and XP but as soon as I installed it on one runni

  • Console -f not working in ALOM

    Hi, I connected to ALOM on V240 installed with Solaris 10. console -f does not give me console on screen. Sun(tm) Advanced Lights Out Manager 1.6.8 sc> console -f Enter #. to return to ALOM. ...I pressed ENTER a lot of times but does not give me cons

  • Pda state is missing vi or c file

    Hello! I have one VI that is working fine in LabVIEW PDA Module 8.0.1. But when I upgrad this VI in PDA Module 8.20 and try to build it I get this error "state is missing VI or C file"! I'm not new in LabVIEW PDA Module and I know that it has bugs (I

  • How to migrate MS SQL Server OLAP data to Oracle 10g OLAP

    Hi, Anyone has any idea on whether migration workbench can migrate my MS SQL Server OLAP data to Oracle 10g (with OLAP option) ? Best Regards, Ian Ho