Percentage in Flash Pie Charts

Hi
I have a pie chart showing calls by company, its currently showing a value on the pie segment (amount of calls). Can I have this showing as a percentage?
Here is my code
select null link, COMPANY label, COUNT(ID) value
from CHART_BY_CUSTOMER
WHERE REGION = NVL(REPLACE(:P8_REGION, '%null'||'%', NULL), REGION)
AND LOB = NVL(REPLACE(:P8_LOB, '%null'||'%', NULL), LOB)
AND TRUNC(TO_DATE(DATECALLED)) BETWEEN TRUNC(TO_DATE(:P8_FROM_DATE))
AND TRUNC(TO_DATE(:P8_TO_DATE))
AND COMPANY NOT LIKE '.Caller%'
group by COMPANY
order by company
Thanks
Adam

Adam,
The ratio_to_report analytic function can do exactly that. Try this:
select null link, COMPANY label, 100*ratio_to_report(COUNT(ID)) over () value
from CHART_BY_CUSTOMER
WHERE REGION = NVL(REPLACE(:P8_REGION, '%null'||'%', NULL), REGION)
AND LOB = NVL(REPLACE(:P8_LOB, '%null'||'%', NULL), LOB)
AND TRUNC(TO_DATE(DATECALLED)) BETWEEN TRUNC(TO_DATE(:P8_FROM_DATE))
AND TRUNC(TO_DATE(:P8_TO_DATE))
AND COMPANY NOT LIKE '.Caller%'
group by COMPANY
order by company
You'll also want to change the Postfix for your value labels to '%'.
- Marco

Similar Messages

  • Refresh Interactive Report based on Flash Pie Chart selection

    I have an Interactive Report:
    select ename "Employee Name",
    mgr "Manager
    from     emp e, dept d
    where e.deptno = d.deptno ;
    That i'd like to have filtered by MGR when a Flash Pie Chart is clicked:
    select null link,
    mgr label,
    count(emp_id) value
    from     emp e, dept d
    where e.deptno = d.deptno
    group by mgr ;
    Can someone indicate how i'd do this?
    Thanks in advance!
    John

    Hi,
    This post might help
    Re: Navigable pie-chart
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Flash Pie Chart

    I have just created my first flash pie chart, previously the application was using svg charts.
    The pie chart appears on the page but there are no colours in the chart.
    Is there another step I need to complete
    Gus

    Print screen to show? http://www.tinypic.com
    Edit: I can't seem to re-create it in the apex 4.0 trial...try just creating a new graph and see if it works.
    Mike
    Edited by: Dird on Jan 15, 2010 10:13 AM

  • Can Illustrator calculate percentages for a pie chart?

    Or do I have to go to Excel (which I can barely use) and enter the numbers there to get my percentages? Thanks.

    ?  What gives you the impression that we're wasting time?
    LauraHaywood wrote:
    I do know how to Google for such answers.
    Please excuse the assumption that you do not know your way around the web... but you did miss the Illustrator forum down the hall and to the right.
    Perhaps if you described the origin of your pie chart and how you are intending to enter numbers in Excel, we might have a better clue as to what you expect. This discussion could be continued in the Illustrator forum.

  • Flash Pie Chart display bugs

    Hello guys! Sorry to disturb you but I'm experiencing strange problems in my application!
    A while ago all my flash charts worked like a charm. Today I discovered, that 3 charts are not displayed anymore.
    Have tried various things to check the reason. The underlying query returns data that can be displayed. Nevertheless, only the legend is shown and not the real chart.
    I treid to reset the xml but it doesn't yield any improvements.
    Do you maybe have a hint for me what could be wrong all the sudden?
    Any help is welcome!
    Regards,
    Sebastian

    Print screen to show? http://www.tinypic.com
    Edit: I can't seem to re-create it in the apex 4.0 trial...try just creating a new graph and see if it works.
    Mike
    Edited by: Dird on Jan 15, 2010 10:13 AM

  • Flash Chart : Percentage values in the pie chart and  values in the legend

    Hi All,
    Query is :
    SELECT null link
    ,GN.region Region
    ,ROUND(100*ratio_to_report(COUNT(DISTINCT GN.submittedbyemail)) over (),2) value
    FROM goodnews_stories GN
    GROUP BY GN.region
    I use the above query to display the flash pie chart percentage values.
    The values are displayed in percentage in legend as well as on the chart.
    I need to display the values in the legend and percentage values in the chart.
    How this can be achieved ?
    Regards,
    Archana

    Hello,
    Can we do this using apex? I have observed in legend as well as on chart it displays the same values which are generated by the sql query.
    Regards,
    Archana

  • Need help to make a Pie Chart

    I am trying to draw a pie chart for the Uptime Report.
    I have the Following table definition.
    create table downtime_detail ( env_code number, down_start date, down_end date );
    insert into downtime_detail values (1,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('01-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('03-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('15-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('15-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('28-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    Now the Below Query returns me the values val1 and val2 on the basis of which I need to draw a Pie Chart.
    ==========================================================
    select round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
         (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
         (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    VAL1 VAL2
    3.64 96.36
    ==========================================================
    Can someone help me try do this ?
    Actually I tried but I couldnt put my custom query to get this Pie chart. Or if there is any other better approach please let me know.

    nikhilskamik,
    I believe all that you are missing in your sql is a NULL. Below is the help text for creating a Flash pie chart.
    Specify the SQL query that will populate your chart, for example:
    select null, ename, sal
    from emp
    Alternatively you can write a PL/SQL function return a SQL query, for example:
    begin
    return 'select null, ename, sal from emp';
    end;
    Your query should then read:
    select null,round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
    (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
    (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    Jeff

  • Mouse Over Value in Pie Chart

    I have two questions -
    1. How do i restrict the no. of decimals in the Mouse Over values for Percentage in a Pie Chart ? The numeric values i can control but the percentage (which the system calculates) seems to be set at default two decimal places.
    2. While displaying the labels even though i am using the ouside end, inside end etc options - i can't seem to control the overlapping of a few labels. Offsetting is something that i need to do by hit and trial. too slow. and not all need to be offsetted. Can i selectively offset for a data point ?
    Please help....Cheers...

    Hi:
       For question1, do you mean the "Data Label->Percentage" right? I think the "Mouse-Over Values" could be set decimal places easily from  "Appearance->Text->Mouse-Over Values", but for "Data Label->Percentage" there is no direct way to show its decimal places. You can use "Label" component to build your percentage you like manually.
      For question2, if all position setting could not fit your need, you can also use label component to build your custom Data Labels.

  • Pie Chart Label - APEX 4.X

    i have made a flash Pie chart and i am trying to make some labeling changes. currently this is my SQL for my chart:
    select 'javascript:alert("#VALUE# hours was worked on Project Number #LABEL#");' link,
    PROJ_NUM label,
    SUM(TIME_WORKED) value1
    from "PROJMANAGEMENT"."TIME_TRANS"
    group by PROJ_NUM
    and it works well but i want the label to show the project number and project name. the issue is that the project name is in a different table. here is an SQL i wrote for a selectlist:
    select PROJ_NUM||'--'||PROJ_NAME d, PROJ_NUM return_value
    from PROJECTS
    order by 1
    it would show "0001--Project Name". that is the effect i am looking for. Any Ideas?????

    when i try that i get the following error:
    1 error has occurred
    Failed to parse SQL query!
    select 'javascript:alert("#VALUE# hours was worked on Project Number #LABEL#");' link, tt.PROJ_NUM||'--'||p.PROJ_NAME label, SUM(tt.TIME_WORKED) value1 from PROJMANAGEMENT.TIME_TRANS tt , PROJMANAGEMENT.PROJECTS p where tt.PROJ_NUM = p.PROJ_NUM group by tt.PROJ_NUM
    Certain queries can only be executed when running your application, if your query appears syntactically correct, you can save your query without validation (see options below query source).

  • Pie Chart slice breakup

    Hi Experts,
    I am having a requirement in OBIEE 11g of showing data as Percentage in a Pie Chart,the chart will be be having two slices(SLICE 1, SLICE 2).
    And the SLICE 1 breakdown needs to be displayed as STACKED BAR CHART.the bar chart should also show data as percentage.
    I am using a common measure for both the charts, in PIE CHART i have shown the measure count as Percentage,But in Staked bar chart i am not able to show the data in percentage.
    A SLICECODE column i am using for the SLICE 1 and SLICE 2 breakup in the PIE CHART, and in the BAR CHART i am showing only SLICE 1 data by placing the SLICECODE column in the Section, and set the "Maximum number of section slider values" as 1 in the section properties
    .Plz suggest me how to show the data as percentage in the bar chart
    Refer the link below for the image.
    http://img577.imageshack.us/img577/2631/waiver.jpg
    thanx in advance.

    The image given uploaded in the link in my below post is the required report output.

  • Creating custom reports with Pie Chart

    Hello,
    I've got a little problem while I'm creating custom reports with SQL Chart.
    For example, I want to have a Pie Chart that represent the distribution of the version for a software, i wrote my query with no problem, the result is in good format.
    My Pie Chart is fine except there are no percentage displayed. The legend on the right is fine with correct count of different version, but no percentage on the pie chart.
    Any idea?
    Thanks in advance,
    Fab

    Hello,
    well, I think this is not possible to ask OEM to print the percentage over the chart.
    Anyway, I sugget you to rewrite your query to compute the % in the query itselft thus to have the pct displayed on the rigth.
    Let's say you want to display the database files' size with such a query: select file_name name,bytes val from dba_data_files;
    This is the way to display the % of each file size over the total (remark the above query has been embeded in the new one).
    select name,ratio_to_report(val) over() pct
    from ( select file_name name,bytes val from dba_data_files )
    order by val desc
    It is quite easy to adapt such a tip to your own query.
    Regards,
    Noel Talard

  • Labels on 3d Pie Chart overrunning

    Is it possible to rotate the labels on a 3d pie chart so they don't run into each other? I have a case where there are small values with a label that running into the next label over for an item?
    I believe this is corrected in the newer versions of any chart, but I am limited to the apex 3.2 version of anychart, since I am hosted on a 3rd party site..
    Thank you,
    Tony Miller
    Webster, TX

    I understand that the feature is not available in current version of APEX Flash Pie charts now.... Can only hope when APEX 4.0 comes out we get newer version of anychart..
    Question, can you eliminate the labels on a Pie chart and just have the pie chart and a legend with labels and values?
    Thanks,
    Tony Miller
    Webster, TX

  • Omniportlet Pie Charts - Rounding Values

    Is there any way to round the percentage values on pie charts? I have values out to 4 decimal places and I'd like to round them up. Thanks!

    I guess that it depends on your input. If you are using a SQL query, you might be able to do the rounding in the SQL query itself.

  • Pie Chart Sector Color

    Hi,
    I am using below query to create a flash pie chart. It return count of "RED" , "GREEN" and "YELLOW" from the color field
    I used the custom color to color first value as "RED", second as "GREEN" , and third as "YELLOW"
    select  null link,
                color ,
                count( color ) value
    from table;Above is working fine if all RED , GREEN AND YELLOW ARE GREATER THAN ZERO.
    Now if there is no RED in the filed, then PI CHART contain only two region one for Green and second for Yellow.
    Problem :--
    If red is not there the value representing the count is green is show in red color.
    How to avoid this
    Thanks
    Shijesh

    Hi Andy,
    I tried the above method but its not working for me..
    here is the query which I am using..
    DECLARE
    vqry varchar(5000);
    begin
        vqry := 'select link , LABEL , sum(value) from
    (select null link, ''Red'' LABEL , user_id , COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=1 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id
    union
    select null link, ''Green'' LABEL , user_id ,COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=2 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id
    union
    select null link, ''Yellow'' LABEL , user_id , COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=3 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id )';
    if :P50_PROJECT_OWNER <> 0 OR :P50_PROJECT_OWNER <> NULL THEN
        vqry := vqry || ' where USER_ID = ' || :P50_PROJECT_OWNER;
    END IF;
    vqry := vqry || ' group by  LABEL ,link';
    return vqry;
    end;I'm using Function Returning SQL Query. Is this the reason why I'm not able to get the result

  • Display the value as percentage in pie-chart in WEBI

    Hi Experts,
       I have two measures  No. of Sales Transactions and Customer Visit. And I created a measure named CustomerConversionRate.
    ie, CustomerConversionRate = ([No. of Sales Transactions]/[Customer Visit])*100.
    So my requirement is that CustomerConversionRate is  to be display  into a pie chart in WEBI . CustomerConversionRate always a percentage.I
    hereby attached a sample pie-chart based on my requirement.
    Eg:CustomerConversionRate=79.27 and Remaining = 20.73
    I want to display  CustomerConversionRate=79.27  and Remaining = 20.73 into a pie chart in WEBI

    Hi ,
    Add 1 more Query with dimension that will have values
    Completed      Or      X
    Remaining      Or      Y
    Duplicate your Query And Keep only 1 Dimension [Extra_Dim]( Remember this Dim Name you have to use it in different way so it would be better if use any Dimension which is not there in First Query )
    Go To--> View Script --> Custom SQL
    write below code in Query Script Editor
    SELECT
      'Completed' As "CATEGORY"
    FROM
      "YOUR_TABLE"  Table__1
    Union
    SELECT
      'Remaining' As "CATEGORY"
    FROM
      "YOUR_TABLE"  Table__2
    And Save this Query .
    Now Rename this Query as Pie Dimension .
    Now You can Use [Extra_Dim] As [Achievment_Status]
    Create Measure Variable [Achievment_Val] as mention above .
    And use it

Maybe you are looking for