Group a report based on a hierarchy level

Hi,
I'm struggling with a query that I'd like to group a report based on the selection of a hierarchy level.
Here's the situation: I've got a table with a "normal" hierarchy, say the EMP table from SCOTT with its EMPNO and MGR columns. What I'd like to have is a report that gives me the sum of the SAL column group by all members on a given hierarchy level. So fi, if I choose LEVEL = 1, Id like to see the overall total, if I choose LEVEL = 2, I'd like to see the sum of salary of all employees managed by this respective manager etc.
I know that there are possibilities to denormalize the table first and try to solve it from there, but what I'd like to know is whether anybody is aware of a more generic way to achieve that? What I could accept is a hard coded limitation of the number of nested levels, as this seems to be very hard to achieve in SQL.
In the real scenario, I'm using only balanced trees, so from that point of view, the reports will be consistent.
Any ideas?
Thanks, Jürgen

select l, sum(salary) from (SELECT last_name, employee_id, manager_id, salary, LEVEL l
FROM employees
START WITH employee_id = 100
CONNECT BY PRIOR employee_id = manager_id) where l > :input_level
group by l;

Similar Messages

  • Reporting based on second hierarchy(PARENT H2)

    Hi,
    I have two hierarchies in the entity dimension, When I try reporting using BPC for Excel I am only able to report using the first hierarchy.How can I use both hierarchies?
    Regards,
    Nithya

    Normally the second hierarchy can be used after adding it to the membersheet.
    Few things to look at:
    - Have you refreshed your client files (close BPC for Excel and start it again)?
    - Have you inserted a new column in the membersheet called PARENTH2?
    - Have you inserted special parentmembers for PARENTH2 and added this to base members in the parenth2 column?
    If this doesn't help: Apshell has examples where it works, please check your dimension setup with the setup within apshell, this will probably give you some hints.
    Alwin

  • Different Calculations based on Hierarchy Level

    Hi Experts,
    I have a requirement to do different calculations of results based on the hierarchy level.
    For example:
    Level A - (total of maximums)
                 Level B.1 - (maximum)
                 Level B.2 - (maximum)
                        Level C
    I need Level B to be the maximum and Level A to bo the total of the maximum values in Level B.
    For example I may have a maximum in B.1 of 100 and a maximum of 200 in B.2
    I then need to get a total of 300 in appearing in level A. Currently if I apply the maximum in the calculate results, it displays 200 in level A.
    I then need to use these numbers at each level in formulas.
    I am using BI 7.0.
    Any ideas?
    Thanks in advance!

    Hi GreenHorn123,
    According to your description, you want to apply condition with only one case statement which can affect any product region dimension. Right?
    In Analysis Services, it's not supported to use one reference pointing to all available dimensions which the lower level hierarchy has same name. In this scenario, it's better to create one dimension which combines all the products region. You can have a
    higher level for [Product-XX Region].
    If you have any question, please feel free to ask.
    Regards,
    Simon Hou
    TechNet Community Support

  • Drill in BW hierarchy level in webi based on input control selection

    Hello Experts,
    I have a requirement in Webi. The Webi report is based on BW hierarchy and it is using hierarhcy both in the report output block and also in the report prompts. We are are BI 4.0 SP5,Patch 6. The report has input controls in it based on the BW Hierarchy. When the report is first executed,the user can drill down the hierarchy by clicking on the "+" nodes to the max level as shown in the screenshot below.
    Now, when the user selects an input control, the data gets filtered but the hierarchy level automatically expands. In other words, when they select a data hierarchy  showed in the input control the hierarchy in table is shown expanded and they want to see the  hierarchy in the table close automatically.
    So ideally its like this when a value from input control is selected.
    Whereas the user wants it to be like this automatically on selecting a particular value from the input control and not in expanded form.
    I'm aware of the Hierarchy depth function but that only takes us to a particular node based on depth and then doesn't allow further drilling after that.
    Is there any setting in webi/bex about always keeping all sub nodes closed to prevent this expansion on selection of input control?
    Thanks and regards,
    Abhishek

    Just did some research on on this and the SAP best practice: The question itself is logically incorrect.
    A report/table filter where there is a hierarchy may remove rows without respecting the hierarchy structure. For this reason, a filter can remove a parent node currently expanded and keep leaves or
      nodes collapsed. To avoid returning an empty table in this case the system automatically expands the hierarchy in the block to shows the resulting members
    Thats why it automoatically expands the hierarchy.
    Closing this thread. Thanks.

  • Repeating frame hiding in Group above report with three levels of grouping

    I'm working on a group above report.I have 3 levels of grouping. ex: Consider emp table
    Group1: Hiring year
    Group2:Manager code
    Group3:Dept no
    The R1 frame is refered to Group1. R2 -Group2, wich will come inside R1.
    R3-Group3, which will come inside R3.
    Now R3 is the inner frame, R2 is the middle frame and R1 is the outer frame.
    I want to display the data of the frame R3. Based on the parameter i'm passing , I want to hide the R1 or R2. I used the format trigger, but it is hiding the inner frames also. But I want to hide only the outer frame,But I want the data of the inner frames.
    all the suggesstions are welcome. Thanks in advance

    Don't hide R1 and R2, i.e. don't use their trigger to display or display items. Instead, put all objects in a normal frame, and hide it depending on the parameters you meantioned.
    What will happen will be somewhat like this
    -- R1
    |-- Frame - ( use trigger to hide depending on parameters )
    | |---R1 Items
    |-- R2
    |---Frame - ( use trigger to hide depending on parameters )
    | |---Items
    |---R3
    |----Frame
    |---Items
    I hope this helps.

  • Material Group Hierarchy Level 1 - Description

    Hi,
         We required Material Group Hierarchy Level 1(0RPA_WGH1) DESCRIPTION. we find data source 0MATL_GRP_1_TEXT to
    get description. that standard data source created based on table TVM1T. We did find any data in that table. kindly guide me
    how to acheive this.
    Thanks

    hi rajendra,
    just check table T023T, hope this will help u.
    thanks

  • How to define primary interaction based on hierarchy level

    I have a 3 level product dimension, such as brand, product type, and product. Now I want to define primary interaction based on the level. If click on brand or product type, it will be drill down. If click on product, it will be send master-detail. Since there is only one column for this dimension on the report when report is constructed, how can I apply different interaction based on the product level?
    Thanks

    iif you are trying to do a normal hierarchical drill down from brand down to product type down to product, and if they are defined so in your database, defining a normal hierarchy is suffice.
    iif you are trying to navigate to a different level in a hierarchy, do a pre-defined drill down.
    all the above options must be defiend in RPD.
    if your Q is not answered can you please elaborate further with the existing example.
    -bifacts
    http://www.obinotes.com

  • Report based on a reord group - PROBLEM

    Using Reports Server / Forms/Reports 6i
    I am trying to run a report based on a record group on the web. It fails giving the error 'Cannot run report.'
    The report is called from a form and the record group is passed as a data parameter. It works fine in Client/Server.
    I have tried to remove the data parameter and run the report without it but, despite working in the Client/Server environment, it still fails on the Web.
    Does anyone have any suggestions?

    I have found the answer to my problem in the forms forum!
    Apparently, this type of report won't work on the web and I have to use temporary tables!

  • Multi level Group Above Report

    I have a multi level Group Above report like this.
    School name : xxxx
    Course1
    Student1
    Student2
    Course2
    Student1
    School name : yyyy
    etc...
    No students are enrolled in some of the courses. I used the Outer Query in SQL to include those courses. Everything looks okay, except the header for the students are still appearing. how do I supress the student heading if no drecords are present?
    Can somebody help me.
    Thank you
    David Smith

    hello,
    you will have to create a counter, that tells you the numbers of students (summary-column, function : count, reset on : course) and create a format-trigger on the heading that hides it when the number of students is 0.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Hierarchy Level in report

    Hi GURUS,
    I have a requirement in report i.e. I need to display the Hierarchy level from the 4th level only, I do not want to see the first 3 levels, where do I do the settings for that in reporting.
    I was told that there can be some settings done in Hierarchy tab of that info object in report level in Values of Posted Nodes. But even that option is disabled. If this is the way I need to do it then how to enable that option or if there is a different option then would appreciate if you explain me in detail. Thanks in advance.

    Hi ganesh,
    for this   same as normal procedure.. but in BEX analyser..  in the query  designer window  properties.. I mean select ur hierarchy and right click and > select Ristrict-> and there you can select particular level of nodes only...
    so, there you can select all fourth level nodes..and  drag and drop it into right side window... and save it.. and execute the query..
    so, now you can get only Fourth level nodes only in the reporting level...
    i think this will helpfull to u..if it's ok ... Reward me points..
    Thanks
    @jay

  • Creating a performance report based upon a custom group

    I am trying to create a simple performance report based on a SCOM group that I created, however when I run the report the relevant data cannot be found.  When I look at the group membership I see a list of Windows servers.  I then go into a generic
    performance report, add a single chart, and line series, and select "Add group" and then search and select the SCOM group I created.  I then add % processor time for 2008 systems as my rule.  However when the report is run, no relevant
    data is found. Performance reports run fine when  selecting "Add group" and selecting the members of the group themselves.
    My suspicion is that it is trying to run the performance report based on the group object and not the members of the group. Is there anyway that I can accomplish this?  Perhaps via XML?
    Keith

    Hi,
    For your reference:
    Creating Useful Custom Reports in OpsMgr: How to create a custom performance counter report for a group of servers
    http://www.systemcentercentral.com/creating-useful-custom-reports-in-opsmgr-how-to-create-a-custom-performance-counter-report-for-a-group-of-servers/
    SCOM reports on performance counters for large groups of servers
    http://www.bictt.com/blogs/bictt.php/2010/11/28/scom-reports-on-performance-counters-for-large-groups-of-servers
    Regards,
    Yan Li
    Regards, Yan Li

  • NCS reports based on AP groups

    Hello,
    I am wondering if it is possible to create reports in NCS and have them filtered according to AP Groups created on a WLC.
    I am wanting to generate reports based on the AP's in certain AP Groups.
    If it's not possible by using the WLC AP Groups, is there another method to create a criteria/filter in NCS based on a group of AP's
    Thanks in advance for any help or suggestions.
    Cheers,
    Jeremy Keen

    Please refer to AP summary reports from the report section
    http://www.cisco.com/en/US/docs/wireless/ncs/1.1/configuration/guide/reps.html#wp1138497

  • Report based on Material group

    Dear all,
    Actually our Business wants a report based on the material group and G/L account.
    For each material group what are the accounting documents generated and the G/L account triggered with amount.
    Example :
    mat.grp         G/L account(121001)  G/L account (121002)
    NUFW             3000 INR                                2000 INR
    Please can anyone suggest me
    What will be my logic to generate a report and how can i extract data
    Regards
    subhash
    Edited by: subhash karipi on Oct 24, 2008 11:49 AM

    hi,
    use ME2N-with selection para meterWE101
    if required use dynamic selection......

  • Use of Hierarchy - and GOTO report based on it

    Hi
    I have a infoobject that uses an organisation unit hierarchy (0ORGUNIT). I use this in a report that also has a GOTO report connected. Both report has the 0ORGUNIT and its hierarchy.
    When I navigate down in the hierarchy, II do a GOTO in a value in the hierarchy, and the filters will be taken into the GOTO report. But....
    WHen i navigate myself down to the lowest level of information in the hierarchy, and on that levell rightclick and to a GOTO, the filters on the 0ORGUNIT (and the hierarchy) does not applies on the GOTO report. All other filters are applied on te GOTO report, but not the hierarchy.
    In the GOTO report I tried to click on the "Filter" button beside the name, and it is empthy. I can't sellected anything.
    I also get the message:
    Diagnosis
    Node restrictions are only permitted for a characteristic with active presentation hierarchy by a node of another hierarchy and end node restrictions.
    You have tried to filter a characteristic with active presentation hierarchy using a node of another hierarchy or a range selection (for example, interval, contain pattern).
    This can take place by toggling the hierarchy or, for example, by using the report interface.
    System Response
    The filter is not evaluated for the characteristic, but removed instead.
    Procedure
    Procedure for System Administration
      Notification Number BRAIN 502

    Hi
    Check the below notes
    Note 1040168 - BRAIN 502: Invalid filter is displayed
    Note 1326629 - BRAIN 502 "Invalid filter" or "No applicable Data".

  • List of customer report based on account group - T.Code

    Dear Guru's
               I need list of customer report based on account group in standard SAP if it there please update th T.Code as earl as possible.
    regards,
    bhanu

    Hello,
    I don't think there is a standard report for this. SE16 select table KNA1 and check for the entries with respect to account group.
    Prase

Maybe you are looking for

  • How to sync calendars and contacts between ios 3.1.3 and Mountain Lion?

    I have a 1st generation iPod touch under iOS 3.1.3 and a MacBook Pro under Mountain Lion 10.8.3 with iTunes 11.0.1. Since the upgrade to Mountain Lion syncing calendars and contacts between the iPod Touch and the Mac no longer works. I don't want my

  • My iphoto has disappeared and photo library

    I have been looking at similiar problems but nothing seems to be exactly like my problem.  My iphoto has disappeared from my doc.  There is no "iphoto" in the applications.  When i go to my iphoto library I get this message. "There is no application

  • How to change Vista German to English?

    Hi, During a recent visit, I bought a laptop in Germany with Vista Home Premium. The display language is German. I do not understand German and I live in East Africa. How can I change the language without having to buy another copy of Windows? Please

  • The MDM repository is in read-only mode

    Hi Experts, In our environment we have a Master ans Slave repository and the synchronization is being scheduled daily. Now we understand from the MDIS logs of the Master repository that the repository is in Read-Only mode and none of the records can

  • Getting an iMac fixed in Mexico

    This is an interesting tale about Apple. I live in Mexico, Mazatlan to be exact. I have an iMac that I bought in February 2008 just before I moved here. It is broken and there appears there is no way to get it fixed in Mexico. I have tried for a mont