Pivot table by formula?

Hi,
I have a strange client requirement, which I want to achieve without using a pivot table, if possible, as; -
1. Pivot tables may not be scaleable to the volume of data which I will ultimately have in the solution
2. I need to create two measures, which I can create separately in two pivot tables, but cannot find a way of presenting them together as one in a pivot table's chart.
The measures are based on; -
Company Name; Volume of Sales expressed as a percentage of total (for a data set which has numerous filters on various dimensions at runtime, so level based measures do not help as the entire total data set at runtime is dynamically determined)
Product Type; Company Name, Volume of Sales expressed as a percent of row parent
It is the two percentage values which I want to see alongside each other, with the Company Name based measure NOT being broken up by Product Type.
So, to illustrate;
Company Name   Volume  
Company A           30
Company B           15
Company C           5
Gives;
Company Name   Measure 1  
Company A           60%
Company B           30%
Company C           10%
(And no - my data is not that well behaved, if only!)
Product Type   Company Name   Volume
Problem Child    Company A         20
                      Company B         10 
                      Company C          0
Cash Cow         Company A         10 
                      Company B           5
                      Company C           5
Result
Product Type   Company Name   Measure 2
Problem Child    Company A         66.67%
                      Company B         33.33%
                      Company C          0
Cash Cow         Company A         50% 
                      Company B         25%
                      Company C         25%
My desired output is; -
Product Type   Company Name   Measure 2   Measure 1
Problem Child    Company A         66.67%       60%
                      Company B         33.33%        30%
                      Company C          0                10%
Cash Cow         Company A         50%            60%
                      Company B         25%            30%
                      Company C         25%            10%Any takers, or even suggestions as to how I can go about this without hard coding??
thanks,
Robert.

Robert Angel wrote:
Hi,
I have a strange client requirement, which I want to achieve without using a pivot table, if possible, as; -
1. Pivot tables may not be scaleable to the volume of data which I will ultimately have in the solution
2. I need to create two measures, which I can create separately in two pivot tables, but cannot find a way of presenting them together as one in a pivot table's chart.
The measures are based on; -
Company Name; Volume of Sales expressed as a percentage of total (for a data set which has numerous filters on various dimensions at runtime, so level based measures do not help as the entire total data set at runtime is dynamically determined)
Product Type; Company Name, Volume of Sales expressed as a percent of row parent
It is the two percentage values which I want to see alongside each other, with the Company Name based measure NOT being broken up by Product Type.
So, to illustrate;
Company Name   Volume  
Company A           30
Company B           15
Company C           5
Gives;
Company Name   Measure 1  
Company A           60%
Company B           30%
Company C           10%
(And no - my data is not that well behaved, if only!)
Product Type   Company Name   Volume
Problem Child    Company A         20
Company B         10 
Company C          0
Cash Cow         Company A         10 
Company B           5
Company C           5
Result
Product Type   Company Name   Measure 2
Problem Child    Company A         66.67%
Company B         33.33%
Company C          0
Cash Cow         Company A         50% 
Company B         25%
Company C         25%
My desired output is; -
Product Type   Company Name   Measure 2   Measure 1
Problem Child    Company A         66.67%       60%
Company B         33.33%        30%
Company C          0                10%
Cash Cow         Company A         50%            60%
Company B         25%            30%
Company C         25%            10%Any takers, or even suggestions as to how I can go about this without hard coding??
thanks,
Robert.OK, here's my stab at it:
1) For measure 2, your formula would be:
Sum(table.sales BY table.product_type, table.company)/(SUM(table.sales BY table.product_type)*100.00
2) For measure 1, your formula would be:
Sum(table.sales BY table.company)/(SUM(table.sales)*100.00

Similar Messages

  • Using An Array Formula within a Pivot Table

    Hello Everyone!
    I've discovered a problem with using the Pivot Table. I wish to add this array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city
    names which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

    Hello Everyone!
    I've discovered a problem with using a Pivot Table. I wish to add an array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city names
    which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

  • Pivot table formula (Opp - product)

    Most opportunities on our database will be linked to more then one product record, which may be in different categories. I have broken out one category so it's revenue appears in a separate column - I now have the opportunity.revenue, the product.revenue, and the product.psrevenue. I can then use a pivot table to summarize these so I have one line per opportunity.
    For my next trick, I need to subtract the summary of the product.psrevenue from the opportunity.revenue.
    If I try it in the "Define Criteria" stage, the formula triggers at the product level, giving me several answers per opportunity, which it then wants to summarize, giving me extraneous values. I have tried a couple other aggregation settings, none seem to fit my needs. I don't see how I can do the math at the summary level. Help?

    You got me most of the way there . . .
    I put the (modified) formula in the table criteria section:
    opportunity.revenue - sum(product.psrevenue)
    with the aggregation rule set to default, and my line items now appear how I want them. Part two, however, is that the line items are grouped by territory, and the summary of the territories are not summing correctly on the pivot table. As an example :
    Territory OppID Opp.Rev Prod.Rev Prod.PSrev RevNoPS
    East 0001.....10,000.....70,000.....30,000...... 70,000 <- the detail lines are calculating correctly
    East 0002.....15,000 ...... 8,000......5,000......10,000
    East 0003.....78,000.....78,000..........0......78,000
    East 0004.....35,000.......... 0.......35,000 ........ 0
    ...................................156,000.....70,000 ......-48135 <- this last "summary" value is way off.
    I hope you get me to my last piece of this puzzle - you've been wonderful help so far.
    Edited by: RN_Pdx on Feb 27, 2009 9:23 AM

  • Pivot Table Report Issue

    Hi,
    I have created a Pivot Table report (I use them all the time in Excel) as one of my rows...I am using a field that is a formula. When I look at the pivot table results there is a sum by this "row category"...all total 1726 items (correct # of total items' but the sum by each of the 4 items is wrong...when I drill (I can only drill from a higher level)...I get the detail of the 1726 items correctly...but if I do a pivot in Excel off the detail I get a different number in the 4 categories (actually the correct summary data)....HOW do I fix this...we really want to use the power of the report...but with such a large error it is difficult to trust the results of the report.
    Report
    Source Type     MAG Created Year     Parent Account     Target Market     # of Accounts
    Marketing     2004     Unspecified     Key Account     2,521
              Quanta Services Inc     Key Account     1
         2005     Unspecified     Key Account     388
              Vipar Heavy Duty     Key Account     29
         2006     Unspecified     Key Account     824
         2007     Unspecified     Key Account     838
              Domino's Pizza     Key Account     9
         2008     Unspecified     Key Account     582
    Marketing                    5,192
    Grand Total                    5,192
    When you drill down...for instance...the data for 2007 Unspecified is 358 NOT 838....
    Please assist!!! ASAP

    It is very difficult to troubleshoot a report without seeing it, but it looks to me like you have a problem with your aggregation rules... each column has an aggregation rule, and a pivot table measure can also have an aggregation rule... sometimes, depending on the formula and columns that make up your formula, the aggregation rules can cause seemingly incorrect totals because the data is aggregated on the table and then re-aggregated on the pivot table.
    If you would like, you may email me directly and I will see if I can help further.
    My email is in my profile.
    Mike L

  • Pivot Table - Calculate Variance - Hidden Fields?

    I need some help adding a target value field inside a pivot table in excel.
    Here is what my current pivot table looks like.
    Regions                  1 year - Actual              1 year - Target??               
    Difference
                       (April 2013 to MArch 2014)                                          
     (Target - Actual)?     
    Region1                $6,355,696.75
    Region2                $6,775,309.87
    Region3                $2,230,424.76
    Regions expand into managers which in turn expand to consultants.
    What I want to do is add a column for target values of the 3 different regions and then create another calculated field that will show the difference between the target and actual values.
    Can this be done without writing any stored procedures in SQL? I want to do this in excel itself.
    The target values are not calculated so can we store them in hidden fields or something in the pivot or excel?

    1. Click anywhere in Pivot and go to Options tab > Formulas > Calculated Field.
    2. Create a calculated field called Target (whatever name your choose). If your target is say 7000000, put this value in Formula field. You may put it with or without =
    3. Now after this, you can once again create a new Calculated Field. Let's say this is Variance. If you variance is Target - Actual, put this as =Target-Actual in Calculated Field.
    4. Your pivot will have whatever you wanted.

  • How to display the column into the narrative or section from pivot table

    I have a report. I have the basic number displayed in the pivot table, but missing one column and I need move one column to the top. The column missing (% of tested) should be calculated by column c /column F's last number, ie, F7=48. My desired column would be H3=c3/F48 9/48, H4=c4/F488/48.... But I could not get the number 48 into my formula, because it is the running total of the all column E. These data is in Pivot table.
    I also need display No of Students 74 in the top of the report. I am not able to get this number from pivot table. It is count distinct on student key from the repository.
    I appreciate any help.
    A     B     C     D     E     F     G
    2          # of Questions     Average # Correct     % Correct     Running total no. of test items     No of students
    3     PATTERNS, FUNCTIONS, AND ALGEBRA     9     4.68     51.95     9     74
    4     PROBABILITY AND STATISTICS     8     3.97     49.66     17     74
    5     MEASUREMENT AND GEOMETRY     11     6.11     55.53     28     74
    6     NUMBER AND NUMBER SENSE     8     4.16     52.03     36     74
    7     COMPUTATION AND ESTIMATION     12     8.2     68.36     48     74
    Edited by: user7315022 on Feb 3, 2010 2:28 PM

    I wish it was this easy. I must not explain it right. All the score from each student and each question for each subject and each test is stored in database. The number of question for the subject is the max of the questions for each subject. Basically, it needs 'parittion by'... But in the OBIEE, it would not let me add any 'partition by' in the column formula. Is this true? ie, can you use partition by in the column formula? Here are the query from trace file.
    RqList
    TEST_YEAR_SEASONS.TEST_SEASON_NAME as c1 GB,
    REPORTING_SCHOOL_YEARS.SCHOOL_YEAR as c2 GB,
    MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c3 GB,
    STUDENT_TEST_SCORES.TEST_SCORE_NUMBER as c4 GB,
    DIVISION_TOTAL_TESTS:[DAggr(STUDENT_TEST_SCORES.DIVISION_TOTAL_TESTS by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c5 GB,
    RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME as c6 GB,
    RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME as c7 GB,
    TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME as c8 GB,
    SCHOOLS.SCHOOL_NAME as c9 GB,
    SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c10 GB,
    SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] / nullif( COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0) as c11 GB,
    MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] as c12 GB,
    (SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] / nullif( COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0)) / nullif( MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY, STUDENT_TEST_SCORES.STUDENTS_KEY, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME, SCHOOLS.SCHOOL_NAME, STUDENT_TEST_SCORES.TEST_SCORE_NUMBER] )] , 0) * 100 as c13 GB,
    STUDENT_TEST_SCORES.STDNT_STNDRD_TEST_KEY as c14 GB,
    STUDENT_TEST_SCORES.STUDENTS_KEY as c15 GB,
    max(SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) / nullif( max(COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0) as c16 GB,
    (max(SUM_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.SUM_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) / nullif( max(COUNT_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.COUNT_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0)) / nullif( max(MAX_TEST_SCORE:[DAggr(STUDENT_TEST_SCORES.MAX_TEST_SCORE by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] )] by [ REPORTING_SCHOOL_YEARS.SCHOOL_YEAR, TEST_YEAR_SEASONS.TEST_SEASON_NAME, RPT_TEST_DEFINITIONS.TEST_SUBJECT_NAME, RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME, SCHOOLS.SCHOOL_NAME] at_distinct [ ] ) , 0) * 100 as c17 GB
    DetailFilter: RPT_TEST_DEFINITIONS.TEST_LEVEL_NAME = 'GRADE 5' and SCHOOLS.SCHOOL_NAME = 'GLASGOW MIDDLE' and TEST_SCORE_TYPES.TEST_SCORE_TYPE_NAME = 'RAW SCORE' and TEST_YEAR_SEASONS.TEST_SEASON_NAME = 'SPRING' and REPORTING_SCHOOL_YEARS.SCHOOL_YEAR = '200102' and TESTS.TEST_ID = 'SOL' and TEST_DEFINITIONS.PARENT_TEST_SUBJECT_NAME = 'MATHEMATICS' and STUDENT_TEST_SCORES.TEST_SCORE_NUMBER < 900
    OrderBy: c1 asc, c2 asc, c4 asc, c6 asc, c7 asc, c8 asc, c9 asc, c14 asc, c15 asc
    +++azadams:320000:32001b:----2010/02/03 16:48:36
    -------------------- Sending query to database named tacdev (id: <<51109>>):
    select distinct D1.c5 as c1,
    D1.c4 as c2,
    D1.c9 as c3,
    D1.c14 as c4,
    D1.c12 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c15 as c8,
    D1.c8 as c9,
    D1.c11 as c10,
    D1.c11 / decode(D1.c10 , 0 , to_number(null), D1.c10) as c11,
    D1.c9 as c12,
    (D1.c11 / decode(D1.c10 , 0 , to_number(null), D1.c10)) / decode(D1.c9 , 0 , to_number(null), D1.c9) * 100 as c13,
    D1.c13 as c14,
    D1.c16 as c15,
    D1.c3 / decode(D1.c2 , 0 , to_number(null), D1.c2) as c16,
    (D1.c3 / decode(D1.c2 , 0 , to_number(null), D1.c2)) / decode(D1.c1 , 0 , to_number(null), D1.c1) * 100 as c17
    from
    (select max(D1.c1) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c1,
    sum(D1.c2) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c2,
    sum(D1.c3) over (partition by D1.c4, D1.c5, D1.c6, D1.c7, D1.c8) as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    max(D1.c1) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c9,
    sum(D1.c2) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c10,
    sum(D1.c3) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c11,
    sum(D1.c12) over (partition by D1.c4, D1.c16, D1.c5, D1.c13, D1.c6, D1.c7, D1.c15, D1.c8) as c12,
    D1.c13 as c13,
    D1.c14 as c14,
    D1.c15 as c15,
    D1.c16 as c16
    from
    (select max(T56699.TEST_SCORE_NUMBER) as c1,
    count(T56699.TEST_SCORE_NUMBER) as c2,
    sum(T56699.TEST_SCORE_NUMBER) as c3,
    T33435.SCHOOL_YEAR as c4,
    T34232.TEST_SEASON_NAME as c5,
    T52429.TEST_SUBJECT_NAME as c6,
    T52429.TEST_LEVEL_NAME as c7,
    T59709.SCHOOL_NAME as c8,
    count(T36922.STDNT_STNDRD_TEST_KEY) as c12,
    T36922.STDNT_STNDRD_TEST_KEY as c13,
    T56699.TEST_SCORE_NUMBER as c14,
    T56693.TEST_SCORE_TYPE_NAME as c15,
    T36922.STUDENTS_KEY as c16
    from
    SCHOOLS T59709,
    TEST_DEFINITIONS T58733,
    TEST_SCORE_TYPES T56693,
    RPT_TEST_DEFINITIONS T52429,
    TEST_YEAR_SEASONS T34232,
    REPORTING_SCHOOL_YEARS T33435,
    TESTS T34149,
    DETAIL_TEST_SCORES T33341,
    STUDENT_STANDARD_TEST T36922,
    TEST_SCORES T56699
    where ( T33341.TEST_SCORE_TYPES_KEY = T56693.TEST_SCORE_TYPES_KEY and T36922.ADMIN_SCHOOLS_KEY = T59709.SCHOOLS_KEY and T34232.TEST_YEAR_SEASONS_KEY = T36922.TEST_YEAR_SEASONS_KEY and T33435.REPORTING_SCHOOL_YEARS_KEY = T36922.REPORTING_SCHOOL_YEARS_KEY and T34149.TESTS_KEY = T36922.TESTS_KEY and T36922.TEST_DEFINITIONS_KEY = T58733.TEST_DEFINITIONS_KEY and T33341.STDNT_STNDRD_TEST_KEY = T36922.STDNT_STNDRD_TEST_KEY and T33341.TEST_SCORES_KEY = T56699.TEST_SCORES_KEY and T33435.SCHOOL_YEAR = '200102' and T34149.TEST_ID = 'SOL' and T34232.TEST_SEASON_NAME = 'SPRING' and T36922.RPT_TEST_DEFINITIONS_KEY = T52429.RPT_TEST_DEFINITIONS_KEY and T52429.TEST_LEVEL_NAME = 'GRADE 5' and T56693.TEST_SCORE_TYPE_NAME = 'RAW SCORE' and T58733.PARENT_TEST_SUBJECT_NAME = 'MATHEMATICS' and T59709.SCHOOL_NAME = 'GLASGOW MIDDLE' and T56699.TEST_SCORE_NUMBER < 900 )
    group by T33435.SCHOOL_YEAR, T34232.TEST_SEASON_NAME, T36922.STDNT_STNDRD_TEST_KEY, T36922.STUDENTS_KEY, T52429.TEST_SUBJECT_NAME, T52429.TEST_LEVEL_NAME, T56693.TEST_SCORE_TYPE_NAME, T56699.TEST_SCORE_NUMBER, T59709.SCHOOL_NAME
    ) D1
    ) D1

  • Replace Null With 0 in Pivot Table in a BI Publisher Report (Not OBIEE Answ

    I have a problem with nulls in a pivot table. I got a measure column in my BI Answers analysis and I made a report with a model based in this analysis. When I add a pivot table to my report the 0 measures don't display.
    In first place I found that there's a bug (13054445). I download and ran the patch, then I tried editing data format in my analysis column and in BI Answers and this worked. The 0 displays correctly, but in the report it's still not displaying.
    I tried editing the formula in the analysis with:
    IFNULL(column,0)
    CASE WHEN column IS NULL THEN 0 ELSE column END
    CASE WHEN column IS NOT NULL THEN column ELSE 0 END
    IFNULL(cast("column"as varchar (10)), '0')
    And nothing works
    When I tried this: CASE WHEN column IS NULL THEN 0 ELSE 656565656 END
    in the report the 6565656565 display correctly but the 0 still doesn't display.
    Does anybody know if that is a bug? Or does another option exist that can I try?

    Hi,
    Following on with this post, I followed the document posted and the formula worked fine. I was able to replace nulls with strikethrough in a pivot table. Since combining the report into a compound layout, the strikethrough has reverted back to nulls. Even when just viewing the pivot table, the same applies.
    I have double checked the column properties and the condition(is null) and formatting(strikethrough) still exists but does not take effect in the pivot table.
    I hav also checked that no data exists in the fact table under the null categories and they are true.
    Can anyone help with this problem, I have also removed the condition and re-applied but still face the same problem.
    Thanks

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working 10g

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks to do the needfull
    Best Regards,
    R.Devarasu

    Hi,
    Null value in database displaying as 0 in report, I need to keep value as in database, and I have one calculated row which is based on null values should also null in report.
    but it showing 0 for null values also so, my calculated row showing wrong result.
    my report is like
    col1 col2
    ABC 0
    BCD 12
    DEF -12 --this is calculated row.
    I require result like:
    col1 col2
    ABC null
    BCD 12
    DEF null --this is calculated row.
    Please let me know how I can achieve this.
    Thanks,
    Rahul

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table?

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks in advance...
    Best Regards,
    R.Devarasu

    Hi Amith,
    I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
    Measure colmns is : Nom_SGD
    IFNULL(Nom_SGD,0.00)
    Movment : dynamic date calc by using $2-$1 oracle formula's
    Actually i am doing below things only,
    31/12/2011 31/03/2011 Movment
    Country
    India 100 -50 -150
    Singapore 200 200
    UK 1200 -1200
    USA 0.00 0.00 0.00 (here changed null as 0)
    Helpmeon this...

  • How to replace null as 0 in  obiee11g pivot table view?

    Hi,
    I am using obiee11g pivot table view,
    I have tried so many views but it's not work. My oracle support team also tired but could not solve it
    1.) used BIN method is that measure columns
    2.) ifnull(column name,0)
    3.) case condition:
    Case when columns is NULL then 0 else column end
    4) data formate override custom formate option
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    http://obieeelegant.blogspot.com/2011/06/how-to-replace-null-values-in-obiee.html
    Note:
    I don't want to show strike-rate and custom message in that blank cell. I want to show blank cell(null values) as 0 in the obiee11g pivot table view.
    Obiee10g version is working fine only issues in obiee11g
    Thanks in advance...
    Thanks
    Deva

    I tried this on 11.1.1.6.2 but I can't see good results.
    I choose subject area A-Sample Sales and I choose:
    T02 per Name Month on rows
    P1 Product on columns
    Measure : IFNULL("Simple Calculations"."17 Net Costs", 0)
    Prompted Year 2008
    On product Install and 2008/01 there isn't value...and I put Ifnull in my formula...
    My problem is that I want to do a conditional format when Product = Install. So I have all column with background colour except Null values...so is not pretty...
    If I add custom numeric format I can see 0 but not with background colour...
    I add a picture:
    http://imageshack.us/photo/my-images/600/tablegk.jpg/
    Any help about it??
    Is a bug on obiee??
    Edited by: Alex1 on 04-sep-2012 4:28

  • Work around for Pivot Tables

    Ok, I think I've found a way to work around pivot tables, although it's no where near as elegant or simple . . . or quick.
    But for small time stuff, the SUMIF and COUNTIF functions are doing what I need. Especially the SUMIF I can run it against a table where I'm just inputting data. Since you can reference a Column instead of a Range, I can just tell it to SUMIF (give it a date range) and then add up costs for certain months. And since you can just drag formulas across cells, I simply put the name of the Month in the left column, tell the formula to search for values that equal that, and then add up values.
    While I would still like Pivot Tables for larger data sets, this workaround seems to be a decent enough implementation.
    On a side note, wouldn't it be nice if Apple made some more in depth tutorials on how to do certain things, such as Pivot Table work arounds?

    Apperently iTunes 11 is not affected (Apple stil makes iTunes11 for the 14 yr old Microsoft XP OS, but not for anything PPCs can run. Go figure)
    "Next door" to Steve was metaphoric, he lived in Los Altos, about 15 miles away, but he cast a big shadow!
    On 9.2.1/10.4.11 differences, some time in the past someone selected 'save file' and checked the box 'don't ask again' on your computers dialog box. That's why you're not given a choice wih the file downloads. I would think that selection should be able to be reversed.
    iTunes 9.2.1/OS10.4.11 puts those downloaded URLs into the Music Libary of iTunes, no matter if it's opened directly, or you click on the file on your desktop. You can create a new playlist, highlight the selection in the Music Libary, and drag it to your new playlist to keep alll the steaming URLs together. NOTE, this only creates an alias, the URL copied by iTunes must remain in the Music Libary. You can then delete the the files on the desktop, if you want. I did multiple stations this way in 9.2.1, they all show in either the new playlist created, or in the Music Libary, and remain after the desktop files are deleted and trash emptied.
    You can switch sations by double clicking them. Another note, all the URLs were all from vtune.
    I hope this helps.
    PS, I forgot how clunky Tiger is compared to Leopard...

  • Pivot table - calculate difference between 2 data points

    I have a pivot table that shows Q1 2008 revenue, and Q1 2009 revenue, by account.
    How do I create a summary column on the right that shows the difference between these 2 values? 2009 value minus 2008 value.
    example:
    2008 2009
    Account Q1 Q1 Revenue Growth
    Joe's Garage $1000 $2500 $1500
    Thanks

    You can try one thing. In the pivot table design, if you have any field in columns then create a formula,name it growth and write $3 - $2.
    This will represent the subtraction of 2nd column from 3rd.
    IF you don't have any field in columns, then duplicate any of the existing ones,pull it in columns and build the same formula.
    Let us know if this works.

  • Pivot Table Chart - Show chart axis as "percent of"

    Hi all,
    I have a pivot table being generated, with the rows as year/month and the columns as web browser. However I'm only showing the top 5 browsers used, so the columns used are dynamic.
    I'd like to show the chart as "Percent of row". I know I can turn this on the table data, but this does not filter though into the chart. Does anyone know how to achieve this? Can you add the total for a row and use that in a formula?
    Thanks in advance

    Hi,
    Not sure about doing it in the pivot table, but we might be able to pull this back as a seperate column in the criteria tab which you can then use.
    Whats your metric name?
    Lets say you have Time.YearMonth, Browser, Count
    Include another column, edit the fx for that column and use sum(count by time.yearmonth) - this will give you the total for that year regardless of browser.
    Add another column and simply do count / sum(count by time.yearmonth) * 100 to get the percentage of the total for the year - play about with using that in the pivot or you might get away with a straight table view?
    Hope this helps, an alternative would be to set up a level based measure in the RPD.
    Edited by: Alastair_PeakIndicators on 31-Mar-2010 08:26

  • Dynamic data source in Excel Pivot Table

    Hello there,
    I am trying to have dynamic data source in pivot table using INDIRECT but getting the error "Reference not valid". Here is how I setup the reference:
    Named range: ConsolLink = "'R:\Root\Sub1\Sub2\Consol File.xlsm'!Source_OpexConsol"
    "Source_OpexConsol" is defined in the source file as a dynamic name using offset formula.
    In the pivot data source, I have tried "=INDIRECT(ConsolLink)" as the data source but that does not work.
    I have also tried using INDIRECT in ConsolLink and just referencing "ConsolLink" as the data source. That does not work either.
    I am not using Power Pivot. Appreciate it if someone can help.
    Thanks.

    If it is open, then try
    Named range: ConsolLink = Range("Consol File.xlsm'!Source_OpexConsol")
    And if it is not currently open, then try
    Dim W As Workbook
    Set W = Workbooks.Open("R:\Root\Sub1\Sub2\Consol
    File.xlsm")
    Named range: ConsolLink =
    Range("Consol File.xlsm'!Source_OpexConsol")
    W.Close False

  • How do I filter on multiple values / labels within a Pivot Table which points to a Power Pivot Model

    Hi,
    How do I filter on multiple values / labels within a large data set within a Pivot Table which points to a Power Pivot Model. I am current using Excel 2010 64 bit. I intend to empower users to achieve this by simply using the Excel user interface, not by
    using Excel formula or DAX. Please find the attached screen shot as a worked example, also in my real life example not all the values are available in the drop down. You can't use a slicer for the same reason as you can't use a drop down. I guess what I was
    hoping for is for the user to be able to enter AND or OR within the associated dialog box. Is there any way around this?
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Hi
    This is the forum to discuss questions about Microsoft Excel develop (VBA, Automation). For your question is more about pivot table features  for Excel, I will move
    this thread to the TechNet forum for Excel.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
    their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Down payment as commitment

    Hi, We implemented fund management in system. Now we are posting advances in F-48, the amount consumed from budget and treated as actual expenses but i need all advances as commitment and at the same time it has to check the availability of budget al

  • Performance of XSLT transformation

    Hello everybody, I´m trying to do some in-database XML transformations from one XML format to another with a rather complex xsl stylesheet of about 9000 lines of code which performs this transformation. At first I tested the XDK XSLT functionality by

  • How to setup Daily Business Intelligence?

    can anyone give me an idea on how to and steps in seting up DBI?

  • Practical problem :Operating unit

    Hi Everybody, We are implementing oracle receivables in our co., the query is, a credit limit is set for a customer. how does the system check the credit limit if he is transacting with different operating units of our company. There is no cerdit set

  • Will the indexes be ignored when using IMPDP...TABLE_EXISTS_ACTION=SKIP?

    Hi guys, 11gr2 suppose that i have a .dmp file which has tables, indexes, and data, and i also have a schema A which already contains tables and data, without indexes is it possible to use IMPDP to import(or say create) all indexes from .dmp to schem