Display Birt Chart Value Once - Doesn't repeat chart data

prince_iamprince_iam BIRT & Oracle Developer

Dear Members,

I have generated a chart using crosstab data. I want to display the data in the chart for only one occurrence. You can see clearly in the picture below the same data is being displayed three times.

Comments

  • I would need to see the report to know what is happening. Maybe adding a filter to the chart would fix it.
    Is there a reason you are using the cross tab instead of getting the chart data from the data set?

    Jeff F.
    Customer Support Engineer I
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Jeff,
    The reason for using crosstab data is that I have calculated measured data percentage by using a formula. Another reason is that crosstab display matrix result whereas, data from the dataset is tabular. so, I have created a chart using the crosstab output to display matrix result on the chart.

  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Jeff,
    Please find the attached sample report.

    Chart Expected Output:

    Chart & Crosstab Output:

    I want the red highlighted aggregated data to be displayed in the chart as being displayed in chart expected output.

  • edited May 13

    Hi prince_iam,

    Thank you for posting the report and screenshot.

    Charts support computed values as well as two-level grouping without using crosstab data. However, it looks like the issue with duplicate values has been resolved and the chart is displaying the desired data, so it isn't necessary to change it.

    Regarding adding the aggregation as a bar, there isn't a way to do it other than writing code to add the data points for each stack in the "YTD" bar. I have an example for an HTML5 chart, but unfortunately HTML5 charts are only supported in the OpenText commercial designer. The code is completely different for SVG charts.

    I can look into how to write the code, but there is a much simpler solution that might work:

    Create a separate chart with only the YTD bar. Place it above the other chart and turn off the X-Axis visibility and the X-Axis label visibility to make it look like one chart.

    Is the two chart solution an option for you?

    Jeff F.
    Customer Support Engineer I
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Jeff,
    I created a separate chart with the only YTD and placed it above the other chart and turned off X & Y-Axis Visibility labels. Since YTD Bar Chart has also been created from the same crosstab data the values of bar chart were repeating for three months as the crosstab has data for the three months. I want to display once the YTD Values (do not want to repeat it for the number of months) actually this is my discussion question. You can see the below chart with only YTD bar value repeating for three times. Whereas, I need it once.

  • edited May 15

    Hi Prince,

    After your second set of comments, I thought the question had changed. Since you are still getting the duplication issue, I have attached an example showing how I recommend creating the chart. It illustrates how to get the chart data you require without using a crosstab. Here are the instructions:

    1. Use the data set as the source for the chart.
    2. On the "Select Chart Type" tab choose a bar chart type. For the subtype, choose "Percent Stacked Bar". Check "Flip Axis" to generate horizontal bars.
    3. On the "Select Data" tab, choose the value to be charted for the Y-Series expression. Looking at the report you posted, I believe this will be MONTH_CASES from PUA_DS. Select the date for the X-Series expression. There is an icon next to the X-Series expression box to open the Grouping & Sorting editor for the X-Axis. Group by "Years" with an interval of 1. You might need to change the "Function" from "Sum" to "First" since you specified the "First" aggregation in your crosstab. Back in the main (Select Data) tab, set "Optional Y Series Grouping" to the "Line" column. This will create the stacks in the bars.
    4. On the "Format Chart" tab, select "Value (Y) Series" on the left. In the editor, check the "Show Series Labels" box. Next, click the "Labels" button to open the Labels editor. Add the "Percentile Value Data" label as shown:

    One thing to note is that three bars are displayed when you run the attached report. This is not due to duplicate data like you have been seeing. The Classic Models database contains three years worth of data.

    Jeff F.
    Customer Support Engineer I
    OpenText
  • prince_iamprince_iam BIRT & Oracle Developer

    Dear Jeff,
    Thank you for comment, My requirement is quite different from what you have posted. Actually, I have created the bar stacked chart following the steps you mentioned if you could just go through Comment#4 in this discussion I have posted my design containing the chart that looks like the screenshot attached and the chart you have developed. The reason for using crosstab is that I have applied some formula calculations on data coming from the database to display aggregated matrix report. In my case, I cannot use direct data from the data source since I have to apply some formula calculations on rough data. Finally, I have developed the crosstab with user desired data. Now, I need to display the crosstab result data on a birt bar stacked chart which I have done successfully. My question and the only concern is that How Can I include the data of crosstab row area (computed aggregated data) along with crosstab cells data combined in one chart. I thought this might not be possible as you also suggested thus I created another chart just above to crosstab data result in chart just to display YTD (crosstab row area computed data) to this chart. I have done that also but the only issue I am facing at the moment is that YTD data is being displayed on the chart for the number of months (in my case 3) times. Whereas, I want to display it once since my crosstab is displaying it only once because it is the summary of crosstab cells data. Please go through Comment#4 and there attached report design.

  • I believe I understand your requirement. I still think the chart with the data set will work. The expressions from the crosstab can be converted to expressions in the chart editor.

    Regardless, we can try to fix the chart that is sourced by the crosstab. However, I have not been able to replicate the chart behavior that you are trying to fix. It would help if I have a working example. Could you please post an example that I can run? The easiest option is to use Classic Models. An Excel data source is an option too. No need to do anything fancy.

    Jeff F.
    Customer Support Engineer I
    OpenText
Sign In or Register to comment.