Join the Grains with different facts

Hello

We have a requirement where we have two facts with different grains

DEPT_FACT - contains (Dept_Id, Dept_Name, recipes)
EMP_FACT - contains (Emp_Id, Dept_Name, Is_Current_Employee)

Some examples of data

DEPT_FACT
========
1 Sales_Dept 100 000
Manufacturing_Dept 2 200 000

EMP_FACT
========
Sales_Dept 100 Y
200 Sales_Dept Y
Sales_Dept 300 N
Manufacturing_Dept 400 N
500 Manufacturing_Dept Y
Manufacturing_Dept 600 N

Our requirement is to create an OBIEE report that shows the * "' recipes / number of current employees in Department BY Department" * "

The above example should demonstrate
Sales_Dept = > $ 50,000 (100 000 / 2 current employees)
Sales_Dept = > $ 200,000 (200 000 / 1 current employee)

Any suggestions on how this can be done?

Hello

Try this code in your fx

Recipes/case when current_employee = 'y' then count end (emp_id by department_name)

Concerning

NGO

Tags: Business Intelligence

Similar Questions

  • 'For' loop with a different number of iterations. Second, the auto-indexation of the tables with different sizes is done. It can affect the performance of the Vi?

    Hello

    I have a loop 'for' which can take different number of iterations according to the number of measures that the user wants to do.

    Inside this loop, I'm auto-indexation four different 1 d arrays. This means that the size of the tables will be different in the different phases of the execution of the program (the size will equal the number of measures).

    My question is: the auto-indexation of the tables with different sizes will affect the performance of the program? I think it slows down my Vi...

    Thank you very much.

    My first thought is that the compiler to the LabVIEW actually removes the Matlab node because the outputs are not used.  Once you son upward, LabVIEW must then call Matlab and wait for it to run.  I know from experience, the call of Matlab to run the script is SLOW.  I also recommend to do the math in native LabVIEW.

  • First, I'm joining the forum with a question CS4 and CS5 Suite for Mac. Can someone tell me why it is NOT a place to submit a question as it is here?

    First, I'm joining the forum with a question CS4 and CS5 Suite for Mac. Can someone tell me why it is NOT a place to submit a question as it is here?

    Creative Suites Mac forum seems to be closed, so moved that Creative Suites Windows the Forum of Creative Suites "base".

    Then... Post your question and someone may be able to help... is your question about the installation of the old software on a new Mac?

    IF El Capitan Mac read below

    CS6 and previous programs have not been tested and will not be updated to run on Mac El Capitan

    -which means you are trying to use CS6 and earlier at YOUR risk of having problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    -IF not, Details of the message from the error messages and a person may be able to help (just not Adobe)

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but here are some links that CAN help with old programs

    -Java https://helpx.adobe.com/dreamweaver/kb/dreamweaver-java-se-6-runtime.html can help

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    -http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developer s-mac-os-x-0158095 /

    -the guardian https://support.apple.com/en-au/HT202491

  • How to read the data with different XML schemas within the unique connection?

    • I have Oracle database 11g
    • I access it via JDBC: Slim, version 11.2.0.3, same as xdb.
    • I have several tables, each has an XMLType column, all based on patterns.
    • There are three XML schemas different registered in the DB
    • Maybe I need to read the XML data in multiple tables.
    • If all the XMLTypes have the same XML schema, there is no problem,
    • If patterns are different, the second reading will throw BindXMLException.
    • If I reset the connection between the readings of the XMLType column with different schemas, it works.

    The question is: How can I configure the driver, or the connection to be able to read the data with different XML schemas without resetting the connection (which is expensive).

    Code to get data from XMLType is the implementation of case study:

     1   ResultSet resultSet = statement.executeQuery( sql ) ; 
    2   String result = null ;
    3    while(resultSet.next()) {
    4   SQLXML sqlxml = resultSet.getSQLXML(1) ;
    5   result = sqlxml.getString() ;
    6   sqlxml.free();
    7   }
    8   resultSet.close();
    9    return result ;

    It turns out, that I needed to serialize the XML on the server and read it as BLOB. Like this:

     1    final Statement statement = connection.createStatement() ;  2    final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ;  3   ResultSet resultSet = statement.executeQuery( sql ) ;  4   String result = null ;  5    while(resultSet.next()) {  6   Blob blob = resultSet.getBlob( 1 );  7   InputStream inputStream = blob.getBinaryStream();  8   result = new Scanner( inputStream ).useDelimiter( "\\A" ).next();  9   inputStream.close(); 10   blob.free(); 11   } 12   resultSet.close(); 13   statement.close(); 14  15   System.out.println( result ); 16    return result ; 17
    

    Then it works. Still, can't get it work with XMLType in resultset. On the customer XML unwrapping explodes trying to pass to another XML schema. JDBC/XDB problem?

  • force GBA v.5 to join the domain with a certain domain controller

    Hello world

    I try to join a CBS c. 5.3 to the domain.  My acs in A location, I can join without problem using my account. When I try to join the ACS in location B to the same domain with the same account, it does not work.

    I looked for the ad client debugging logs and noticed that the ACS in location B goes to some a domain controller. However, I would have expected the ACS to contact a different DC, located on the same site that GBA... This does not happen.

    My question: how to determine what contact DC GBA? Is it possible to force HQ to reach by connecting a certain DC?

    Thanks for any help or ideas?

    IDA

    Hello

    Please check your sites and services in your DNS configuration to see if the right domain controllers are sent to the ACS when attempting to connect to the domain. This function is essential and allows to optimize the links that GBA chooses to join the domain.

    The way this works is that ACS is trying to resolve dns records for the global catalog servers and domain controllers for the dns server configured in the initial installation script. Then the dns makes a decision based on the source ip address of the dns request and think that the ACS is in a specific site and returns the result which domain controllers and global catalogs is configured in this specific site.

    Let me know if this helps.

    Tarik Admani
    * Please note the useful messages *.

  • Join the domain with existing VM

    Hello

    How can I join a domain with existing virtual machines? We have a couple of VMs that we want to join a domain via the command (PowerCLI) file. etc name should stay as it is, only a domain join must be made.

    Thanks in advance.

    CU

    Rainer Friedrich

    You can try to create a new OSCustomizationSpec (New OSCustomizationSpec) with only the domain (domain, DomainUserName, DomainPassword) join.

    Then, apply the OSCustomizationSpec to the VM (s) with the Set-VM cmdlet (and the OSCustomizationSpec parameter).

  • View 5 error 18 cannot join the domain with parent vm win7

    I have installed our software required, the agent installed, the parent has added to the domain and when I go to create the pool I finally get the 18 error saying that it was impossible to join the computer to the domain. If I look in the current directory on our server, 2003 sbs, it shows that the machine is there, but when I try to connect to the console under vsphere, I get the error that says "the security on the server database has no infographic account for this workstation trust relationship." I see a lot of fixes for this but those who tend to treat images of windows xp.

    Also, I advanced and tried to create the registry entry for the "NeutralizeNT4Emulator" who did not work as well as manually configure the default gateway and the dns server.

    Should I disable the firewall on our virtual machines of parent service? I tried without success either, but I thought I'd ask.

    Any help would be appreciated. Thank you!

    This may be due to the incompatible version of composer, see Composer 2.6 is not compatible with the view Agent 5.0. Refer to this http://kb.vmware.com/kb/2006879 KB

  • Find the space between the word with different endings and figures

    Hello

    I am trying to find a way to find spaces between the words and numbers.

    Screen Shot 2014-02-11 at 13.12.34.png

    I'm limited to only use the word "WORD" (capital or small capitals) with different endings like - ing s y and more (using \S+).

    I wrote something like (? i) (? < = WORD\S +) \s(?=\d+) but this does not work due to some limitations of advanced search, I think?

    Any suggestions?

    Peter

    On the other hand, I think that.

  • Stabilization of the project with different video settings

    If I open the project with the settings for video 1080 p and then add 720 p video, how can I make stabilization for her? (When I opened a video with different sequence settings it me does not make stabilization)

    Is it possible to work in a single sequence with different settings of the video?

    Images that do not match the nest of parameter sequence first, then add the string.

  • Different users accessing the data with different rights

    Hello
    I just started with Oracle and I don't know if
    This is the right way for what I was intending.

    I want to allow access to the data (tables, views,...) to different users with different rights.
    For example a user with select only the rights and another with select and insert rights.

    Database Oracle 10 g Express Edition is.

    Here are the steps I did:

    -This user will be allowed to select only
    create user UserSelectOnly...;

    -This user will have select and insert privileges
    create user UserSelectAndInsert...;

    -This user only contains data
    create user BaseDB...;

    -creation of test in BaseDB data
    create the table tdTest (...);

    -definition of role in BaseDB for right to select
    create the role RoleSelectOnly;

    -granting SELECT privilege for RoleSelectOnly
    Grant select on tdTest to RoleSelectOnly;

    -select grant (role) to the user UserSelectOnly
    grant RoleSelectOnly to UserSelectOnly;

    -definition of role in BaseDB to select and insert privileges
    create the role RoleSelectAndInsert;

    -grant select and insert privilege for RoleSelectAndInsert
    Grant select, insert on tdTest to RoleSelectAndInsert;

    -grant select and insert (role) to the user UserSelectAndInsert
    grant RoleSelectAndInsert to UserSelectAndInsert;

    My problem is that the definition of user (BaseDB) works as a database.
    Are there more effective ways in Oracle 10 g Express?

    Thank you
    Wilfried

    Hello Wilfried and welcome to the forum.

    First of all, it's a property that you have given time to review the security of the database.

    My immediate comments:

    You have 3 users:

    -This user only contains data
    create user BaseDB...;

    Very well, good thing. Use an administrative account/data owner.
    You might consider locking when you do not have administrative tasks in the schema.

    -This user will be allowed to select only
    create user UserSelectOnly...;

    -This user will have select and insert privileges
    create user UserSelectAndInsert...;

    OK, but no need to take account of their privileges in the names. You could simply call their

    SomeUser
    AnotherUser

    You have two roles

    -definition of role in BaseDB for right to select
    create the role RoleSelectOnly;

    -definition of role in BaseDB to select and insert privileges
    create the role RoleSelectAndInsert;

    Seems ok, it's a good thing here for the description of privileges in the role itself.

    Maybe I would call them something like
    RoleSelect or RoleRead or BaseDBSelectRole
    RoleInsert or RoleWrite or BaseDBUpdateRole

    Should be updated (and DELETE), as well?

    Another approach would be to separate between the tables.

    For a group of tables, select, insert, update, delete are granted to a role.

    For another group of tables, different privileges are granted to another role.

    That is, there is no general answer, correct, it depends on your application.

    Often the roles are used for ease of maintenance. In other words, if you have several users who need
    the same set of privilege, these are maintained by a role.

    Maybe you don't want to use roles, but I like them.
    But attention not only

    Select on all tables to a single role
    Insert on every table to another role
    Update on all tables to a third party role.

    Unless, of course, it gives meaning to your scenario.

    My problem is that the definition of user (BaseDB) works as a database.
    Are there more effective ways in Oracle 10 g Express?

    Not sure what you mean. Schema in Oracle and user are often used for the same thing.

    In your case, BaseDB is the owner of (all) the tables, no problem.
    As mentioned, you might choose to block the account.

    The main thing is, no application, or ad-hoc user should log in as BaseDB

    And the users of your system should be exactly the privileges they need to do their jobs
    nothing more, nothing less.

    Concerning
    Peter

  • Click on the boxes with different audio

    Hello!

    I use 5 Cp and I have problems with the audio. Button or box where to click must play an audio short or long after that is clicked on.  In the text, I want to cover some words with boxes click with different sounds, students can click to hear the sounds. in the text, there may be a lot of words I want to cover with boxes to click.  Is it possible to do? If Yes please let me know how.

    Thank you

    Ok.  Who can be a little trickier.  Normally a button or click box has a break point on the timeline and once you click on the object continues to play beyond its break point.  This means that you get only a click... UNLESS... you change the Action when a click to be an advance Action that does two things.  First of all, it does everything you want to take place (for example to read the audio file) and THEN he moves the read head to a point BEFORE the break point so that you get another possibility to click New.

    Blog of Lilybiri has some good examples of this sort of thing: http://lilybiri.posterous.com/

    You may encounter a problem where even after you have everything installed correctly the buttons stop working after a while.  In this case your best recourse would be to use the Widgets event handler instead, these can transform any object into a clickable button screen.  But even better, is that they give you preferences to disable continue and the pass/fail criteria reset after Action so that your users can click on your buttons as often they like to repeat actions, these useful widgets trial versions can be downloaded here.

  • Return only the columns with different values.

    Hi all

    I am trying to solve a seemingly trivial problem but can't seem to get any clear answer anywhere in any forum. Consider a single table with 5 columns and only two lines:
    row_id           first_name         last_name        age            gender
    1                    John                  doe               27             M
    1                    Jane                  doe               27              F  
    Assume that there is no primary key or any other constraint. Also assume that there are only and only two lines of this table. So I need basically a query that, overall above lines, would return first name and sex, because they are only different columns in two lines, as well as their values. Even if I can get sort of column names that are different and that would be enough that I can easily access the values later. It is also important to remember that I may not know the names of the columns in the columns, so basically, somehow, I use user_tab_columns in the process.

    Any help appreciated.

    Published by: 894302 on May 1, 2013 10:35

    Hello

    894302 wrote:
    The exact release could be just a varchar variable that lists all the columns that have different values with each column name separated by commas. We'll call the query you want as a QUERY. So, if I do something like

    Select the REQUEST of double; Output should be: 'first_name, equality of the sexes. Is this possible?

    In this case:

    SELECT     RTRIM ( DECODE (a.row_id,     b.row_id,     NULL, 'row_id,')     ||
                    DECODE (a.first_name, b.first_name, NULL, 'first_name,') ||
              DECODE (a.last_name,  b.last_name,  NULL, 'last_name,')  ||
              DECODE (a.age,        b.age,          NULL, 'age,')      ||
              DECODE (a.gender,     b.gender,     NULL, 'gender,')
               , ','
               )          AS different_columns
    FROM     rhit_table_x  a
    JOIN     rhit_table_x  b  ON  a.ROWID     < b.ROWID
    ;
    

    Output:

    DIFFERENT_COLUMNS
    ---------------------------------------
    first_name,gender
    

    This assumes that you have really a table, then you can use ROWID to distinguish the lines, since there is no primary key.
    If this isn't the case, you first assign ROW_NUMBER in a subquery.

  • to join two columns with different data types

    Hello experts,

    I have two tables...
         create table1
       (
         col1 varchar2(20)
        );
        
      create table2
        (
          col1 number(10)
        );  
    
      
    with their data as below
              with table1 as
      (  select 'xx' col1 from dual union all 
         select 'yy' col1  from dual union all
         select '01' col1  from dual union all
         select '02' col1  from dual union all
         select '03' col1  from dual union all
         select '04' col1  from dual 
      ),table2 as 
       (
         select '01' col1 from dual union all
         select '02' col1 from dual union all
         select '03' col1 from dual union all
         select '04' col1 from dual 
        )
          
        
    My question
    How to join table1.col1 table2.col1? since they are different data types... .i tried to use To_char but then I got 0 zero,.
    is there is all the functions I can use?


    Thank you!!

    user642297 wrote:
    Hello experts,

    I have two tables...

    create table1
    (
    col1 varchar2(20)
    );
    
    create table2
    (
    col1 number(10)
    );  
    

    with their data as below

    Above, you said that table2.col1 was a NUMBER.
    Below, is a VARCHAR2:

    with table1 as
    (  select 'xx' col1 from dual union all
    select 'yy' col1  from dual union all
    select '01' col1  from dual union all
    select '02' col1  from dual union all
    select '03' col1  from dual union all
    select '04' col1  from dual
    ),table2 as
    (
    select '01' col1 from dual union all
    select '02' col1 from dual union all
    select '03' col1 from dual union all
    select '04' col1 from dual
    )
    

    Woudn't be a better approximation of your real tables:

       ),table2 as
        (
          select 1 col1 from dual union all
          select 2 col1 from dual union all
          select 3 col1 from dual union all
          select 4 col1 from dual
         )
    

    ?

    My question
    How to join table1.col1 table2.col1? since they are different data types... .i tried to use To_char but then I got 0 zero,.
    is there is all the functions I can use?

    Your postal code. I think the best way is to use TO_CHAR, but maybe you were using it differently.

    SELECT     *
    FROM     table1
    JOIN     table2     ON     NVL ( LTRIM (table1.col1, '0')
                       , '0'
                       )     = TO_CHAR (table2.col1)
    ;
    

    This assumes that table1.col1 never contains decimal points, unary + signs, exhibitors, or other things like that.
    He will be responsible for negative numbers, but if table1.col1 contains 0 in front after the sign less (for example '-0012' "), then the solution is a bit more complicated.

  • Satellite M50 does not start, go back to the screen with different start modes

    My Satellite M50-130 does not start correctly. When you turn it on, it goes to a black DOS screen, saying: "We apologize for the inconvenience, but Windows did not start successfully. A recent hardware or software change might have caused this. "It offers me different start modes: Safe Mode, with networking and command prompt. Last good Configuration known; and start Windows normally.

    I tried all the 5 options, gets the commissioning insofar as the Toshiba screen, but then with all the options, it returns to the initial screen offering the 5 modes of starting. Same thing happens when laptop works again.

    The only recent software change, I've done was an update to Norton AntiVirus/Internet Security and I suspect that Norton is at least part of my problem, see history below. I know it's the Toshiba support site, but I tried Norton so many times without success, I gave up. Plus, I'm no expert at all, so I can't be sure that it is really the source of all my sorrows. All advice welcome!

    The performance of my laptop has deteriorated seriously in the last two months. She is extremely slow, and cleaning of malware and unwanted General does not help. It began right after that I renewed the license of Norton last year and upgraded to the 2007 version. The worst downturns are always connected to direct upcoming Norton upgrade programs. I disabled the live upgrade, but programs always come to the top, and I can't stop them, a popup tells me that they are protected.

    Wireless internet is also very capricious, even if another computer on the same network works fine.
    During the last week, I had to relax a little internet security settings (from "moderate to severe" to "low to medium") because after an other update of Norton AntiVirus, I couldn't access to interactive Web sites.
    It is perhaps a coincidence because Norton AntiVirus comes with updates at least twice a week - but what else could be the problem?

    My apologies for the long rant, I am grateful for all the advice!
    Thank you
    I have.

    Hello

    I think the only way to make your system works correctly again is to restore with the cdrom of onboard catering. Simply manage to save your data from your hard drive (the best way would be to put your machine's HARD drive in a USB - HDD enclosure and copy important data on another computer), then wipe the system completely off you hdd.

    After that, the system must run again...

    Welcome them

  • Save the file with different settings

    So I that I continue to have to apply the same steps for PDF files. I'm not really terrible with programming. I wrote 2 tools using the trustedSave MenuItem. I have 2 different tools created. I commented in the steps, I'm not sure whether or not are possible. I have the book in the api, but still, I'm not a programmer... I fall through the best that I can

    // TO SAVE WEB FILE
    app.addMenuItem({
        cName: "trustedSave",
        cUser: "Save SIS File",
        cParent: "Tools",
        cExec: "saveSisFile();",
        nPos: 0
    });
    
    
    function saveSisFile() {
        app.beginPriv(); {
            // EMBED ALL PAGE THUMBNAILS
            // USING SMALLEST FILE SIZE FROM PDF OPTIMIZER
            this.saveAs("~/Desktop/" + this.documentFileName.substring(0, 11) + '_SIS.pdf');
        }
        app.endPriv();
    }
    
    
    // TO SAVE TILED FILE
    app.addMenuItem({
        cName: "trustedSave",
        cUser: "Save P File",
        cParent: "Tools",
        cExec: "savePFile();",
        nPos: 0
    });
    
    
    function savePFile() {
        app.beginPriv(); {
            // EMBED ALL PAGE THUMBNAILS
            // DELETE PAGE 1
            // PRINT - TILE LARGE PAGES - WITH 0.5" Overlap
            this.saveAs("~/Desktop/" + this.documentFileName.substring(0, 11) + '_P.pdf');
        }
        app.endPriv();
    }
    
    
    
    
    

    Acrobat 8 Pro, Windows 7 64 bit machine

    Maybe when you use for this batch sequences.

Maybe you are looking for