business-objectswebi

Filter using sub report in BO SAP Web Intelligence


I need to report on employees who have not been absent during the last year. I can do this easily using the following simplified SQL

    SELECT  EMPLOYEE_NUMBER
    FROM    Employee
    WHERE   Employee.EMPLOYEE_NUMBER NOT IN (
        SELECT  EMPLOYEE_NUMBER
        FROM    EmployeeAbsence
        WHERE   EmployeeAbsence.ABSENCE_END_DATE >= ADD_MONTHS(SYSDATE, -12)
    ) 

I have been investigating how I could do this using sub queries in BO Web Intelligence, but have had no success.


Solution

  • You should be able to do this with a subquery within the Query Panel. Here is an example from the eFashion universe to show all stores that do not have the Outerwear Line. This approach only works when the objects you want to return and those involved in your exclusion criteria are in the same universe.

    enter image description here

    If they are not in the same universe you will need two queries. First create a query of what you want to exclude. For my example that is Stores that have the Outerwear Line.

    enter image description here

    Then create a query where the Store Name is not in the list of Store Names that do have the Outerwear Line.

    enter image description here

    If you would like to see the creation of a subquery in action watch this short video.