Pivot

Hi,
I have tables like this:
Table1:
Year | ID | col1
2007 | 1 | x
Table2:
Year | ID | Date
2007 | 1 | dd/mm/yyyy
2007 | 1 | dd/mm/yyyy
Now I need to get the result like this in one row:
Year | ID | Date1 | Date2
2007 | 1 | dd/mm/yyyy| dd/mm/yyyy
For each year there are two different dates only so I need Date1 and Date2 only.
How to get the result from two rows into one row. I searched for Pivot but all examples are saying like this:
select year, id,
max(decode(expression, true,false)) like this only but in my case I don't have that expression type.
Thanks in advance

Something along these lines, if you know how many rows there are:
SELECT
    YEAR,
    ID
    MAX( CASE WHEN RN=1 THEN DATE END ) AS DATE1,
    MAX( CASE WHEN RN=2 THEN DATE END ) AS DATE2,
    MAX( CASE WHEN RN=3 THEN DATE END ) AS DATE3,
    MAX( CASE WHEN RN=4 THEN DATE END ) AS DATE4
FROM
    SELECT YEAR, ID, DATE, ROW_NUMBER() OVER (PARTITION BY YEAR, ID ORDER BY DATE ) AS RN FROM TABLE 2
GROUP BY
    YEAR,
    ID;

Similar Messages

  • IF statement in Calculated Field for Share point, doesnt calculate sum in my Excel Pivot table.

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

    Hi Everyone
    I used this in SP calculated column field.
    =IF([Shift Sched]="1pm to 10pm","0",IF([Shift Sched]="2pm to 11pm","1",IF([Shift Sched]="3pm to 12am","2",IF([Shift Sched]="4pm to 1am","3",IF([Shift Sched]="5pm to 2am","4",IF([Shift
    Sched]="6pm to 3am","5",IF([Shift Sched]="7pm to 4am","6",IF([Shift Sched]="8pm to 5am","7",IF([Shift Sched]="9pm to 6am","8",IF([Shift Sched]="10pm to 7am","8",IF([Shift
    Sched]="11pm to 8am","7",IF([Shift Sched]="12pm to 9am","6",IF([Shift Sched]="1am to 10am","5",IF([Shift Sched]="2am to 11am","4",IF([Shift Sched]="3am to 12pm","3",IF([Shift
    Sched]="4am to 1pm","2",IF([Shift Sched]="5am to 2pm","1",IF([Shift Sched]="6am to 3pm","0",IF([Shift Sched]="7am to 4pm","0",IF([Shift Sched]="8am to 5pm","0",IF([Shift
    Sched]="9am to 6pm","0",IF([Shift Sched]="10am to 7pm","0",IF([Shift Sched]="11am to 8pm","0",IF([Shift Sched]="12pm to 9pm","0"))))))))))))))))))))))))    
    it was able to work fine however my issue is when i extract the information to excel and use a pivot table the table is not able to calulate the sum of the value for this field. Can you please help me with this. this is for an Attendance traker for Night
    Differential pay for employees. they create a daily log of their shift schedule and if i summarize this in pivot the value in the calculated field for this is not getting the sum.
    Thanks,
    Norman

  • Average & SUM in a Single criteria in the Pivot View

    Hi,
    Can you plese let me know whether it is possible to have SUM at the Grand Total level & Average on the Right Hand side of the Pivot Table view at the same time.
    Thanks & Regards
    Siva.

    Hi,
    The way you want to do it is not possible.
    What you can do is make a union of 2 reports one is using the Sum and the other the AVG and not use the Grand total provided by OBIEE.It's kind of creating your own Grand Totals
    Look at this thread it will help:
    http://obiee101.blogspot.com/2010/08/obiee-combine-with-similar-request.html
    If you are using pivot table you can think about a new calculate item as a GT
    http://varanasisaichand.blogspot.com/2010/12/aggregate-functions-on-grand-total.html
    Best regards
    Adil
    PS: Please don't forget to close the thread and assign points when your question is answered
    Edited by: adil.harrab on Jun 6, 2011 1:36 PM

  • Error while opening central admin link after power pivot uninstall sp 2010?

    Error while any link opened in the cental admin
    example:http://server:port/_admin/WebApplicationList.aspx
    Required permissions cannot be acquired.
    ULS log when Config wizard ran 
      An exception of type System.IO.FileNotFoundException was thrown.  Additional exception information: Could not load file or assembly 'Microsoft.AnalysisServices.SharePoint.Integration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
    or one of its dependencies. The system cannot find the file specified.
    System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AnalysisServices.SharePoint.Integration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.AnalysisServices.SharePoint.Integration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
       at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
       at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
       at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
       at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
       at Microsoft.SharePoint.PostSetupConfiguration.ReflectionHelper.InvokeConstructor(String assemblyQualifiedName, Type[] constructorSignature, Object[] constructorParameters)
       at Microsoft.SharePoint.PostSetupConfiguration.TaskCommon.ReflectionHelperInvokeConstructor(String assemblyQualifiedName, Type[] constructorSignature, Object[] constructorParameters, TaskBase task)
    the error same as the below article:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7a06ebc8-ad8f-4b76-bc44-a8171fde6816/absolutely-sick-of-powerpivot-the-product-stinks-failed-to-find-assembly?forum=sqlkjpowerpointforsharepoint
    but any of the sollution did not work.
    Thanks
    Ravi
    Ravi

    I have uninstalled power pivot now the central adminlinks are working.
    but when i run configuration wizard it pups with error:
    Could not load file or assembly 'Microsoft.AnalysisServices.SharePoint.Integration'
    Can i delete follwoing key in the registery?
    The follwoing article asked to remove the key:
    http://social.technet.microsoft.com/Forums/en-US/487f18d4-32cf-4056-a6de-433f69bb7470/configuration-wizard-failed-to-find-assembly
    my registry entry
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\ServiceProxies\Microsoft.AnalysisServices.Sharepoint.Integration.EngineServiceProxy]
    "AssemblyQualifiedName"="Microsoft.AnalysisServices.Sharepoint.Integration.EngineServiceProxy, Microsoft.AnalysisServices.SharePoint.Integration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    "ServiceProxyName"="MSOLAP$POWERPIVOT"
    Ravi

  • Error when creating pivot table in BI publisher template

    When I try to create a chart or pivot in BI publisher it keeps throwing error
    'Please load Datasource first'
    It allows me to create table so I am not sure why is complaing when creating a pivot.

    Hi
    This error you are getting while creating RTF template right?
    yes, before proceeding to use the columns you need to load the XML data of your data model into your template
    1. Open Microsoft Word.
    2. From the Oracle BI Publisher menu, select Log On.
    3. Enter your BI Publisher credentials and the URL for the BI Publisher server. (Contact your system administrator if you do not know the URL.)
    4. The Open Template dialog presents the same folder structure as your BI Publisher Reports home page. Select the report for which you want to build a template.
    5. Select Open Report to load the data to the Template Builder; or double-click <New> in the Layout Templates pane.
    Note that any existing templates will be listed in the Layout Templates pane.
    select <New> in Layout template section than select Open layout tempate to get automatically load your data into template..
    ELSE
    do manually,
    in publisher,
    after saving your report go to view the report
    select data template and import that to your local drive.
    now in your MS-Word.. in bi publisher toolbar
    you find Data option, then select the load xml and give that path...
    after this you can carry on creating charts or tables..
    Hope this is what you want..
    Thanks & Regards
    Kishore Guggilla

  • Issue in pagination of pivotal view (10 rows per page)???

    Hi All,
    I’m implementing pagination in pivotal view, report has to show 10 records per page.
    Report has to show for 8 weeks data per employee and 10 employees information per page, however report is displaying data for more than 10 employees and for a week single week, in second page its showing for 2 week and so on ….
    I used all the following functions however issue persists.
    1. FLOOR(RCOUNT(1) /10)
    2. CEILING((RCOUNT(1))/10.0)
    3. TRUNCATE((RCOUNT(1)-1)/10, 0) +1
    4. CASE when rcount(1)<11 then '1-10' when rcount(1)<21 then '11-20' when rcount(1)<31 then '21-30' else '30+' end
    Any suggestions
    Thanks,
    SMA

    Look in criteria add one more column
    in FX write this formula
    Go to the formula window of this column and enter the formula shown below
    CASE WHEN RCOUNT(1) < 11 THEN ‘1-10′
    WHEN RCOUNT(1) < 21 THEN ‘11-20′
    WHEN RCOUNT(1) < 31 THEN ‘21-30′
    ELSE ‘30+’ END
    Once this is done, drag and drop this column into the Pages section of your pivot table. Now you can paginate through your pivot table report.
    let us know if its solve your problem
    Thanks

  • Can any one tell how to create pivot table

    Hi ,
    Am trying to create a pivot tabel in the MDM Import Manager. Iam able to see the preview of the pivot table which i want to create. But when i try to click "OK" button, an error message getting displayed like...
    "The new table cannot be created because the data source is not updatable.You may need the data source to an updatable format such as Microsoft Access before proceeding".
    Due to the above error am not able to create pivot table, plz let me know if any one know how to solve this problem
    Thanks & regards
    Praveen k

    Hi Praveen ,
       The solution to your problem is -
    The data source must be updateable in order for MDM to
    create the new pivot or reverse pivot table. However, you can still
    perform the steps leading up to table creation – including the preview –
    even on a data source that is not updateable, so that you can explore
    pivoting or reverse pivoting as a transformation option. If you then
    decide you want to actually create the new table, convert the data
    source into a format that is updateable (such as Microsoft Access) and
    perform the pivot or reverse pivot on the new data source.
    To create a pivot table, you must identify the source fields that
    participate in the pivot, which ones contain metadata and which ones
    contain data, which ones must be combined, the one-to-one
    correspondence between metadata and data fields and/or field
    combinations, and the key field or fields.
    To create a pivot table:
    1. In the drop-down list of source tables, make sure the table you want to
    pivot is the current source table.
    2. In the Source Hierarchy tree, select all the field nodes corresponding to
    both the metadata fields and the data fields by which you want to pivot.
    3. Right-click on one of the nodes and choose Create Pivot Table from the
    context menu, or choose Source > Create Pivot Table from the main
    menu
    4. MDM opens the Create Pivot Table dialog
    5. In the Key Fields dual-list drop-down control, move one or more fields
    from the Available Fields list to the Selected Fields list to identify the
    key fields on which to perform the pivot
    6. In the dual-list control of fields, drag-and-drop the data fields from the
    Field Values Become Field Names list to the Field Values Become
    Field Values list
    7. If necessary, select two or more fields in either list that must be
    combined into a field combination, and click on the Combine button, or
    right-click on one of the fields and choose Combine from the context
    menu
    8. If necessary, drag-and-drop fields or field combinations within each list
    to create the one-to-one correspondence between metadata fields and
    data fields.
    9. Click on the Preview button to display a preview of the first ten records
    of the pivot table
    10. When you have verified that the pivot operation you have defined will
    have the desired effect, click OK to close the Create Pivot Table dialog.
    11. The MDM Import Manager creates a new table named “table <Pivot>”
    in the data source (where “table” is the name of the original source
    table).
    12. In the drop-down list of source tables, select the newly created pivot
    table on which to perform subsequent import processing.
    Hope that helps ...
    Regards
    Deepak Singh

  • Can I 'explain' data in a pivot table?

    Hi All.
    I have a request that has baffled me.
    I need a way to use 'text' to describe the results of a report. If I were doing a simple report,
    this would be a non-issue. Here are my hurdles:
    I have a report that uses a Union via Set Operations (so I'm combining two result sets).
    The results are then shown in a pivot table.
    Within the pivot table, variances were created using 'New Calculated Item' under measures.
    I want to be able to display in a narrative, or some other magical technique, the results of theses calculated items.
    Data Example:
    <pre>
    Date1 Date2 Variance Variance%
    Total Sales 10 20 10 50.00
    Sales have increased 50% compared with last quarter. (<- desired result)
    Today, I can show @1, @2 etc, but it only shows the columns under 'Date 1'.
    Any help is greatly appreciated!!
    Cindy

    First, if you design a report correctly (e.g., accurate and descriptive headers, etc.), you greatly reduce the need for an "explanation of data." It should be intuitive. If it is confusing to understand, the design of the report should be looked at. (Is this report illustrating what the user needs to see? Should I use a graph instead of a table or vice-versa? Am I reporting on the right metrics?)
    That being said, it may be helpful at times to have a narrative to give an overall view of what the report displays. For this, you have the Narrative View to explain whatever might make the report more useful to the end-user. For example, you may have them note certain conditions and what that would mean, etc. (Conditional formatting would be great for this, unless you are considering cross-column conditioning in which case conditional formatting doesn't work.*)
    But if you are looking for row-by-row explanations where you use the data in the row as part of the "explanation" (as inferred by your inclusion of @1 and @2, etc. in your question), then I think you may be trying to please your end-users a bit too much. Perhaps I have misunderstood you, so I shall end here and wait for your response.
    *Until 11g, that is. There are also workarounds...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Not able to see data in Pivot table

    Hi,
    I have a issue with pivot table i have a column which displays values 0 and 1 and another column called month when i am placing this month column as a section and values column as a measure i am not seeing any values means i can see the month as header but instead showing 0 or 1 its showing blank columns. previously i created similar kind of table it worked but at that time values column data type is number this time its char. can anybody help me out how i can see the data in the pivot table. i already tried converting this column to number but still i am not able to see data in that values column.
    Thanks

    Hi copter,
    Place the month column in rows and value column in measure section and check if results are coming.If still it doesnt come i suppose you dint apply aggregation rules to value column.In pivot view click values column and aggregate by /select min or max or either server complex and check your results.
    (I suppose your aggregation rules is default)....Correct this one and you can place it in sections as per your requirement.
    Cheers,
    KK

  • How to update ADF VO object to refresh the data in ADF Pivot table

    I need to know how to update the View object so that the date in pivot table is refreshed/updated/filtered.
    here are the steps I performed to create ADF pivot table application using VO at design time.
    1) created a collection in a Data Control (ViewObject in an ApplicationModule) that provides the values I wanted to use for row and column labels as well the cell values (Used the SQL query)
    2) Dragged this collection to the page in which wanted to create the pivot table
    3) In the pivot table data binding editor specified the characteristics of the rows (which attribute(s) should be displayed in header), the columns (likewise) and the cells.
    Now, I have a requirement to update/filter the data in pivot table on click of check box and my question is how to I update the View object so that the date in pivot table is refreshed/updated/filtered.
    I have got this solution from one of the contact in which a WHERE clause on an underlying VO is updated based upon input from a Slider control. In essence, the value of the control is sent to a backing bean, and then the backing bean uses this input to call the "filterVO" method on the corresponding AppModule:
    but, I'm getting "operationBinding" object as NULL in following code. Please let me know what's wrong.
    here is the code
    Our slider component will look like
    <af:selectBooleanCheckbox label="Unit" value="#{PivotTableBean.dataValue}"
    autoSubmit="true" />
    The setDataValue() method in the backing bean will get a handle to AM and will execute the "filterVO" method in that, which takes the NumberRange as the input parameter.
    public void setDataValue(boolean value) {
    DataValue = value;
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("filterVO");
    Object result = operationBinding.execute();
    The filterVO method in the AMImpl.java will get the true or false and set the where Clause for the VO query to show values.
    public void filterVO(boolean value) {
    if (value != null) {
    ViewObjectImpl ibVO = getVO1();
    ibVO.setWhereClause("PRODUCT_TOTAL_REVENUE(+) where rownum < 10");
    ibVO.executeQuery();
    }

    Did you define a filterVO action in your pagedef.xml file?
    You might want to read on how to access service method from a JSF Web Application in the ADF Developer Guide for 10.1.3 chapter 8.5

  • Check if refreshing data in pivot table was finished

    Hello guys, 
    This is my first post here so forgive if I'm asking in wrong place. 
    Maybe you can help me or give me some hint how can I check if data in pivot tables refresh event was finished.
    So I'm using excel plugin that allows to load excel spread sheets from external source e.g application server,
    in this reports there are define some pivot tables with olap connections. When report is opened data is automatically refreshed,
    what I'm trying to do is somehow check if this refresh was finished and start manipulating data in c# but I'm not able to check
    if refresh was finished or it's still going.
    I found that query table has refreshing flag which indicates if some query is running. But I'm not able to get to querytable object or  to listobjects object, I'm using excel 2013 and only when I added sql database connection to sheet there was value
    in listobject object but still querytable was empty, 
    What I'm doing wrong ? 
    public void refrestTest()
    Excel.Sheets test= excelApp.ActiveWorkbook.Worksheets;
    foreach (Excel.Worksheet displayWorksheet in test)
    if (displayWorksheet.ListObjects.Count > 0)
    var pp1 = displayWorksheet.ListObjects.get_Item(1).QueryTable.Refreshing;

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    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.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • UI performance testing of pivot table

    Hi,
    I was wondering if anyone could direct me to a tool that I can use to do performance testing on a pivot table. I am populating a pivot table(declaratively) with a data source of over 100,000 cells and I need to record the browser rendering time of the pivot table using 50 or so parallel threads(requests). I tried running performance tests using JMeter, but that didn't help.
    This is what I tried so far with JMeter:
    I deployed the application in the integratedweblogicserver and specify the Url to hit in JMeter ( http://127.0.0.1:7101/PivotTableSample-ViewController-context-root/faces/Sample) and added a response assertion for the response code 200. Although I am able to hit the url successfully, the response I get is a javascript with a message that says "This is the loopback script to process the url before the real page loads. It introduces a separate round trip". When I checked in firebug, it looks like request redirect of some sort happens from this javascript to another Url (with some randomly generated parameters) which then returns the html response of the pivot table. I am unable to hit that Url directly as I get a message saying "session expired". It looks like a redirect happens from the first request and then session is created for that request and a redirect occurs.
    I am able to check the browser rendering time of the pivot table in firebug (.net tab), but that is only for a single request. I'd appreciate it if anyone could guide me on this.
    Thanks
    Naveen

    I found the link below that explains configuration of JMeter for performance testing of ADF applications(Although I couldn't find a solution to figure out the browser rendering time for parallel threads).
    http://one-size-doesnt-fit-all.blogspot.com/2010/04/configuring-apache-jmeter-specifically.html
    Edited by: Naveen Ramanathan on Oct 3, 2010 10:24 AM

  • How to do it in pivot..

    Hi experts
    i have one probs....
    My report is having three column : where C=A*B
    A B C
    10 10 100
    5 5 25
    TOTAL 15 15 225
    Now how to get this , when i m doing sum at pivot is is doing sum for Column C and giving 125 instead of 225....so please suggest me how can i achieve it...
    Thanks in advance
    regards
    frnds

    Hi,
    I would like to clarify you some points:
    1. You want to see sum(a)*sum(b) in C... for that your using Grand Total..
    If my understanding is correct... you shoud not go for Grand Total because it does not make any sense implementing in this scenario...
    Grand Total: as label indicates it will SUM UP the values..
    To get your report:
    Do not use Grand Total..
    As my previous explanation, use two unions which will get you to the following:
    A-----B------C
    ========
    1-----1-----1 =====> I Union
    2-----2-----4 =====> I Union
    3-----3-----9 =====> II Union
    If you still want to achieve it (3rd Row) in a Pivot.. I dont think it is possible to implement..
    -Vency

  • Removing (blank) from Pivot Tables Populated from Data Connection

    It took me a long while to fix this one (and a long time to search, because it's a funny one to try to use boolean logic for) and I thought I would share because I've seen a score of folks out there looking for this.
    If you have a pivot table with blank values in the row/column area instead of values, Excel automatically populates the cell with (blank).  The word blank shows up in any cell that doesn't have a value, but what if you don't want all those ugly (blank)
    values showing up in your report?
    If you're pulling the data from an outside source, like a SQL server (in my case from the Project Server Reporting database) then you can't just change the source data, so you seem pretty stuck.
    My coworker and I came up with the following fix:
    Select the entire sheet.  Use conditional formatting to find all cells that contain the text (blank).  Then for the format, go to "Number" and "Custom".  In the custom field, enter ;;;.  Apply the conditional formatting and those pesky
    (blank) values turn into real blanks.  This even works when copying pasting the data into another sheet or application.  And if the value changes the next time you refresh your data, the new data appears.
    I found this very valuable in my reporting and just wanted to put it out there for the rest of the community.

    Hi,
    Thank you for sharing your experience and post here.

  • How to sum only the positive numbers in a Pivot table when using Power Pivot

    Hi, I have this schema:
    …and this Pivot:
    How do I get this result from PowerPivot.
    If I only use normal Excel Pivot I could use Calculated Field and get the wanted result in a snatch.
    But I guess the problem with using PowerPivot in this scenario is a context or/and a aggregation problem?
    Here is the formula I try to use (I have also tried the FILTER function but couldn’t get it right):
    TRUE DEMAND (Forecast- Stock>0) =
    CALCULATE([TOTAL DIFF (FORECAST-STOCK)],
    [TOTAL DIFF (FORECAST-STOCK)]>0)
    Here is my ExcelFile:
    https://onedrive.live.com/redir?resid=B7906DD091ACC085!357&authkey=!AJN_r_1NCP4thrE&ithint=file%2cxlsx
    Any suggestions?
    Best Regards
    Tommy

    Hi Tommy,
    sorry, a few words are not enough.
    This post does explains it in detail:
    http://sqlblog.com/blogs/marco_russo/archive/2010/01/03/how-calculate-works-in-dax.aspx
    Imke

  • 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

Maybe you are looking for

  • How do I get color management options in PSE9?

    I have been trying to print pictures on an HP printer and when I do they come out fairly red and pink.  When I go under more options under printing and select color management the only option that I have to adjust is print space.  I have a PSE9 book

  • Clearing a open item with two bank accounts at a time

    anybody answer the below question please how can clear the vendor line item using two bank accounts at a time

  • Duplicate UK holidays in calendar

    I am using calendar to sync two google calendars. In one calendar I have added the UK Holidays calendar. My diary entries sync fine to the iPad but every time I open the calendar the UK Holidays data is added again. I now have many entries for this a

  • Why can't I buy in iTunes....???

    hello..... i'm from mexico....... i have a .mac account.......... i have a paypal account....... i log in........ click on review info....... but i can't register a credit card because my billing info is not in the USA....... if i choose paypal......

  • Mounting Firewire drive over Network?

    So here's the deal: I have an external hard drive (FireWire 400) which is currently connected to an iMac G4, but I am unable to mount the volume over the network and access it via WiFi on my MacBook. In other words, it does not appear in the list of