How to use SQL above and PARTITION BY in OBIEE expression builder?

Hello
I want to create a new logical column with the following SQL query.

AMOUNT (inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE) /SUM (Inventory Detail.Qty) ON (PARTITION OF the inventory Detail.A Inventory Detail.B, Item.C)

How to use OVER and the SCORE OF OBIEE expression builder?

Thanks in advance

Hi Janet,.
We cannot use by in the Expression builder (DB). But use the same formula like this in Fx to response

AMOUNT (inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE) /SUM (Inventory Detail.Qty) > (PARTITION OF the inventory Detail.A Inventory Detail.B, Item.C)

Sum (Inventory Detail.Qty by detail, Item, MyDate) /SUM (qty by detail, item)

First check the numerator if it worked well or not then go with denominator

compare the results with sql you have

Let me know if it works

Thank you
saichand.v

Published by: André Varanasi on 27 July 2010 21:27

Published by: André Varanasi on 27 July 2010 21:28

Tags: Business Intelligence

Similar Questions

  • How to use the TRUNC function with dates in the expression builder in OBIEE.

    Hello
    How to use the TRUNC function with dates in the expression builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns 1 July 2010"where sysdate is July 15, 2010 ' in SQL. I need to use the same in the expression builder in the logical layer mdb column.


    Thanks in advance

    Use it instead:
    TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE)

  • How to use SQL or another way to check if the assets have been post GL?

    Hi all:
    I wan to ask, how to use SQL statements or any other way to check iif assets have been post GL?


    my environment is oracle 11.5.9






    Concerning
    Terry

    to create entries and transfer to GL
    assets: -.
    (1) (log N entries)-> standard
    (2) complete the setting and submit.

    to check if the assets have been post GL
    Journal:--
    (1) magazines-> Enter
    (2) in the form of research journals Source LOV, select 'Assets', then enter
    (3) you will find all transferred assets (Addition or depreciation) magazines, and the status of the batch is (Unposted), then review and Post

    Published by:! ALotfy September 2, 2010 08:54

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use this site and whre to find answer to my questtion?

    How to use this site and whre to find answer to my question?

    Well, you found how to ask a question, see the answers, simply click on your profile jake coll at the top right of any page name and look at my Questions.
     
     
  • SQL how to use a variable and use the result as a reference for the name of the table

    Hi all

    I have new in the declaration of Oracle, sorry in advance if something is easy for you all. BTW, I have this scenario:

    I have a table OL structured in this way:

    Date - it contains dates, for example 11/01/2015

    TableName - it contains strings, for example, OL1, OL2, OL3 and so on...

    Then I have a different table, the name of these tables are of the same name in the table of the OL, so I have table table, OL1, OL2, OL3 table and so on. The structure of these tables is the same. And Yes.

    table OL1

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 JOHN DOE 12345679

    2 PAUL 111111122 TIBBS

    table OL2

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 ANNA KRAIG (NULL)

    NATHAN FRESHMANN 111111133 2

    If the scenario is clear, I would like to retrieve the value (null), research in all the OL * tables by using the value of the OL table (tablename) max.

    If I'm going to do these simple steps, I got the result:

    Select max (TableName) OL

    the result will be OL2

    # I know not how to use the option set to avoid changing the table name in the sql statement all the time.

    set mytable = 'OL2.

    Select Name, family name

    of & mytable

    When the phone is null

    Any idea?

    Thank you very much in advance.

    Hello

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    bulk collect into v_result_set

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null';

    dbms_output.put_line (v_ol);

    end;

    Correct the code such as:

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null' bulk collect into v_result_set;


    for i in v_result_set.first ... v_result_set. Last

    loop

    dbms_output.put_line ('LOG ID: ' | ) ( v_result_set.log_id (i)) ;

    dbms_output.put_line (' NAME CLOSELY: ' |) v_result_set.presentation_name (i));

    dbms_output.put_line (' START TIME: ' |) ( v_result_set.begin_time (i)) ;

    end loop;

    end;

    Kind regards.

  • How to use the Fusion and my whole bootcamp partition?

    Here's what I want to do...

    I have a bootcamp with Windows XP partition on this already...  I installed merger and created a brand new Windows XP on it and everything goes smoothly.  There are times when I want to start windows in my score so I can play my games without having to run two operating systems at the same time.

    I was able to do this with Parallels for a long time, but I have since then switched.  My question is...  How to use my bootcamp with merge partition?  I just want to be able to run Fusion when I'm not playing games, and when I am, simply restart so I can get my complete resources of computers.

    Well, the reason why you did not see the Virtual Machine library window was because the Windows XP Home Edition virtual computer is configured to start automatically when the merger opens such indicated by the orange and white star.  By clicking on the orange/white star if he stops automatically load and clicking on the blue/white star it will become orange/white

    Just a little note... The CONTENT on Bootcamp is not what I want to use. I want to use Windows XP from VMWare Fusion I have done, but on the training camp of partition.

    Based on what you said it sounds like what you want to do a (Virtual, physical) V2P transfer and while this is feasible technically is not necessarily a simple process and V2P requires that the source properly prepared to be transferred to a different material and then an Image created, and then loaded into the Boot Camp partition.  It is outside the scope of his abilities and VMware Fusion and requires the use of tools 3rd party and knowledge of such a process of preforms.  IMO, if one may wonder how to do that, so it's just better than you manually rebuild the Boot Camp partition to suite your needs if the current configuration does not meet your needs.  That said a clean generation always produces a less problematic situation and provides long-term for a better overall performance however if you want to search the forum or Internet V2P or physical Virtual you can find more information on what it has been covered before.

  • How to use FOLLOW-UP and COMPRESS the clause of the CREATE statement TABLE?

    my oracle's 10g and the statement of create table below:

    CREATE TABLE S005.q100

    (

    Q1 tank (1)

    )

    NOMONITORING;

    After you create this table, I ask USER_TABLES, but the value of the follow-up column is YES.

    I think there should be no how is? and also I have the same problem with the COMPRESS.

    Thank you very much


    Hello

    Heap - organized tables are your usual routine tables. It is created using the BUNCH of the ORGANIZATION of the CREATE TABLE statement clause. This is the default value.

    The other variant of this clause is ORGANIZATION INDEX, which means that you will create an organized Index of Table. In other words, it is a table that is stored in a B-tree, like an index.

    You also have an EXTERNAL BODY, which means that you will create an external table. Here is generally flat files outside of the database that you can order the database to see tabular to use SQL (read only) against. You will also need the settings on how the data are presented on the file, so that your database knows which column will match that of the data.

    The COMPRESS on 10G is known as the "basic compression" and it works on ordinary table segment blocks, which are organized by a bunch of tables.

  • How to use the rescue and recovery and product recovery discs?

    Hello world

    I just recently became a new owner of a T61 and really enjoy. I did have a chance yet to test the hotline of lenovo, as I've not yet screwed anything up if badly needing their help. I tried a factory clean reinstall from the service partition and it worked fine. I would like to know, how one uses it the rescue and the recovery boot disk and the recovery disks of the product I created myself? From my previous experience with Dell and HP, I didn't insert the one and restart the computer, and the rest followed. But the ThinkPads, if I ever wanted to bring a State own factory using these disks, can I use with rescue and recovery first, followed by the recovery of product? I'm curious, what is the difference between the two?

    art140 wrote:

    From my previous experience with Dell and HP, I didn't insert the one and restart the computer, and the rest followed. But the ThinkPads, if I ever wanted to bring a State own factory using these disks, can I use with rescue and recovery first, followed by the recovery of product? I'm curious, what is the difference between the two?

    1. Place the rescue and recovery disc in the drive, and then restart.  This disc contains the same program that you used when you restored your system from the service partition.  Once the program is loaded, you will see the same screen with the same options as before.
    2. Choose to restore your system as you did with the service partition.  You will not see an option to do a custom restore.  When the program is run from the disk, it automatically performs a full restore.
    3. The program will rebuild the service partition and copy the program files on him.  When you are prompted, insert the product recovery disks.  The compressed system and application files contained on these discs will be copied to the new service partition.  Once the copy process is completed, your system will be restored from the service partition.
    4. After restoration, you will be able to make a new set of recovery discs if you wish.  You will also be able to do a restore custom through the service partition.

    Don

  • How to use a black and white AVI as an alpha channel?

    Brand new first CC 2015 user here (actually just a user first brand new total), with what is probably a very simple question:

    How can I take a clip in black and white and get the Premiere Pro to use as a mask in alpha channel?

    Basically, I got three items I want to composite together, each of them their own separate AVI:

    (1) a coin of spinning

    (2) a silhouette of the spinning coin

    (3) a movement background

    The animations of the rotation of the piece were made by Bryce 7.1, if this can help, a program that does not know how to incorporate animations alpha channel masks.  I call the "silhouette" as such because it is a completely white room version, turning on a totally black background - perfect for use as an alpha channel, but without the alpha channel information incorporated.  And no matter what I do, I'm not the first to recognize it as such.  Any help would be appreciated.

    Put the background on the V1.

    Thread the room spinning V2, directly above him.

    Put the Silhouette of the coin spinning on V3, just above (and in sync with) V2.

    Go to the control panel effects and go to Video Effects > Keying and select the overlay Cache Track effect. Drag it to and apply it to the room turns on V2.

    A once applied, click the clip on V2 to select and go in the effect controls panel.

    Click the triangle next to the overlay track matte value using Composite matte Luma and the Matte of Video 3. Check the box opposite if necessary to invert the matte.

    MtD

  • How to use the case and decode to extract data

    Hello gurus of PL/SQL,.

    I use Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64-bit Production version

    I have a table in the following form-
    drop table TT2;
    create table TT2(College, Class,gender,status,fees) as select
    'IITB','MBA','M','P',255600 from dual union all select
    'IITK','MTech','M','P',300000 from dual union all select
    'IITD','MBA','F','P',450000 from dual union all select
    'IITKH','MBA','F','P',350000 from dual union all select
    'IITC','MTech','F','P',420000 from dual union all select
    'IITB','MTech','M','P',185000 from dual union all select
    'IITC','MTech','M','P',235000 from dual union all select
    'IITD','MBA','F','F',175000 from dual union all select
    'IITM','MBA','M','F',257000 from dual union all select     
    'IITKH','MTech','F','P',335000 from dual union all select
    'IITD','MBA','F','P',540335 from dual union all select
    'IITC','MBA','F','F',125089 from dual union all select
    'IITD','MTech','M','P',290756 from dual union all select
    'IITM','MBA','M','P',200000 from dual union all select     
    'IITKH','MBA','F','F',534990 from dual union all select
    'IITD','MBA','F','P',221000 from dual ;
    certain conditions of extraction are as follows-

    MATTER OF STATE
    College of 'IITB' and status = 'P'-'good WestRegion '.
    College of 'IITC' and status = 'P'-'good SouthRegion '.
    College 'IITD' and 'IITK' and status = 'P' and type = 'F' - 'female NothRegion spent.
    College not in 'IITK' and status = 'F' - 'Ex Kanpur Failed'

    Results-
    Region Statnding     Fees
    WestRegion Passed     440460
    SouthRegion Passed     655000
    NothRegion Female Passed     1386335
    Ex Kanpur Failed     1092079
    Used SQL
    I use the following query that only make sure of the case, but it's not how I want to exit, if I try to use the case to breast to decode then how to work on it.
    SELECT (CASE WHEN College in ('IITB') and status='P' then sum(fees) else 0 end) WP,
    (case when College in ('IITC') and status='P' then sum(fees) else 0 end) SP,
    (case when College in ('IITD','IITK') and gender='F' and status='P' then sum(fees) else 0 end) NFP,
    (case when College in ('IITK') and status='F' then sum(fees) else 0 end) ExKF
    FROM 
    TT2
    GROUP BY College, Class,gender,status
    SELECT CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end region_standing,
                sum(fees) fees
    FROM TT2
    GROUP BY  CASE WHEN College in ('IITB') and status='P'
                        then 'WestRegion Passed'
                when College in ('IITC') and status='P'
                        then 'SouthRegion Passed'
                when College in ('IITD','IITK') and gender='F' and status='P'
                        then 'NothRegion Female Passed'
                when College in ('IITK') and status='F'
                        then 'Ex Kanpur Failed'
                else 'Others' end;
    
  • How to use Managed review and approval

    Hello

    I'm a RIA Consultant to iDA MediaFoundry, Adobe Gold Partner in Belgium. I'm trying to understand how to work the new solution accelerators and how we can use them in the solutions we develop for customers.

    I am a bit stuck but with the successful review and approval solution accelerator. I can't understand how it works, how it communicates with livecycle and how we can use this application in our projects for clients.

    Does anyone have a tutorial or a document on the use of this solution accelerator? I know it's a pretty big question and the answer will be even greater, but I could really use the help of someone who knows how to use it.

    Thanks in advance for your answer.

    Kind regards

    Ronald Kamp

    Hello

    Following links may be useful:

    http://www.Adobe.com/devnet/LiveCycle/articles/esubmissions_solutionaccelerator.html

    Above article is written for an older version of the MRA, so some information may be embusked, but still could be a good starting point. Please read chemicals like ARM in the Article.

    To learn more about ARM, please see solutions guide:

    http://help.Adobe.com/en_US/LiveCycle/9.5/MRASolution/index.html

    To learn more about the RCA building block, please refer to:

    http://help.Adobe.com/en_US/LiveCycle/9.5/MRA_RCATech/index.html

    I hope this helps.

    Thank you

    Amit

  • Data type of text is not displayed using SQL Server and ASP/VBScript

    Maybe someone help me with this because I used to use PHP/MySQL, but I use for this a Classic ASP/VBScript and MS SQL Server instance and I don't know that much. The scenario is I have an old site that was designed using html tables and I do a CSS/XHTML update on Visual design. As long as we are here, there are some pages that are dynamic and use a MS Access database and we thought it's a good time to upgrade from MS SQL Server (2005, to be exact). No time/money for bringing classic ASP VBScript in ASP .NET.

    Overall, the upgrade went fairly well, especially just to create a new connection to the DB in SQL Server in Dreamweaver after all the tables and data were migrated to SQL Server. Almost everything works as it should. A problem though.

    For some reason, the data of the data type 'text' in SQL Server is not appear (or sometimes appear). I even tried to recreate the recordsets and binds fresh data and the code is more or less identical to what we had before. Anyone know what's happening, or how I can get this data to show?

    I think that there is perhaps some simple and double quotes in the text data and which could be screwing things up. I was hoping there is only a simple function that I could apply the code, but as I said, I don't know.

    Thanks in advance for any help you can provide.

    -Bill

    captcashew wrote:
    > Maybe someone help me with this because I used to use PHP/MySQL, but for this one
    > instance I use Classic ASP/VBScript and MS SQL Server and I do not know
    > that much. The scenario is that I have an old site that was designed using html
    > tables and I do a CSS/XHTML update on Visual design. As long as we
    > are there, there are some pages that are dynamic and that use a MS Access
    > database and we thought it's a good time to upgrade from MS SQL Server
    > (2005, to be exact). No time/money to classic ASP VBScript in ASP.
    > .NET so.
    >
    > Overall, the upgrade went quite well, especially just needed a new
    > connecting to the DB in SQL Server in Dreamweaver after all tables and data
    > have been migrated to SQL Server. Almost everything works as it should. One of the problems
    > If.
    >
    > For some reason, the data of the data type 'text' in SQL Server is not
    > appear (or sometimes appear). I even tried to recreate the recordsets and
    > binds fresh data and the code is more or less identical to what we had
    > front. Anyone know what's happening, or how I can get this data to show?
    >
    > I think that maybe there are single and double quotes in the text
    > data and which could be screwing things up. I was hoping that there is only a simple
    > function I could apply the code, but as I said, I don't know.
    >
    > Thanks in advance for any help you can provide.

    Your text field should be the last of your select statement, as
    its not stored in the table with the other data, its stored elsewhere,
    as a binary object, should be treated differently. Its common
    the migration of the access problem.

    If you need more of 8000 characters stick with him, otherwise use
    varchar (8000) or nvarchar (4000) If you need (limited unicode characters
    4,000 cos of the double byte characters)

    Dooza
    --
    Display guidelines
    http://www.Adobe.com/support/forums/guidelines.html
    How to ask Smart Questions
    http://www.CatB.org/ESR/FAQs/smart-questions.html

  • How to use a Timer and an event with LIFA/Arduino

    Hello world

    I feel that my question is going to sound really stupid, but I can't find the solution. I want to use my arduino to do two tasks at the same time. I want to use a while loop with a timer, read my pins in my arduino. It's really easy. But then, I like to use as a case of event do different type of things. In the example, I downloaded, I just use an event to activate my fan. Again, I have no problem to use it by itself. But I can't find a way to use both at the same time, especially when I want out of my application. Because I use my arduino inside my event, I put it in an another while loop. But I want also an another while loop, but uses the clock. In my example, if you use the tool to highlight run, see you clearly that my signal goes the while loop that contains the case of the event, but not other things that I want to use it as a timer. That's probably because I missed something on the architecture, it's just to give you an idea. I just want to know what is the smartest way to combine my case of the event and my time in a loop using the timer and how to close them correctly. I'm not an expert in Labview, so it is a bit difficult for me. If my comments seems obscure, I'll answer all your questions without any problem.

    I thank very you much for your help and attention.

    FrenchLizard wrote:

    If you use the tool to highlight execution, you can clearly see that my signal goes the while loop that contains the occurrence, but not others

    Because of the LabVIEW data flow model: value of stop button is connected to the first loop for the second loop. You can see "How to stop several loops using the only button" then you can use any implementation. http://digital.NI.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE

  • How is used offline connection and how? Don't know what it is?

    Any info on off connection and how to use it would be appreciated.

    Hey, Sheryl,

    You can make network files available offline by storing files shared on your computer so that they are accessible when you are not connected to the network. If you do this, you can work with the files in the same way that you work with them when you are connected to the network. When you reconnect to the network, the changes that you made to the files are updated on the network.
    http://support.Microsoft.com/kb/307853

    Windows 7

    Email - subject of working offline

Maybe you are looking for