Row level Difference

HI Pls help for the below scenario to get a row level difference in OBIEE
My Pivot Report looks like.
Global Amt
Acc_level_1 Acc_level_2 Jan-08 Feb_08 Mar-08
1)Accounts payable Trade 500 200 300
Tax 30 40 50
Accounts Payable Total: 530 240 350
2)Cost of Revenue Finished Goods 100 90 100
Training 30 40 50
Cost of Revenue Total: 130 130 150
NET
(Accounts Paybale tot-Cost of revenue tot) : 400 110 200
I Need to have Difference of Accounts payable Total and Cost of Revenue total each month wise.
Pls let me know how to implement this logic in OBIEE ANSWERS. we have grand total option but how to calculate difference.
Regards
Ramesh B

I do not understand you task.
Perhaps the TimeSeriesFunction in the Repository (BusinessLayer) will help you.
AGO and TODATE
Or you calculate your values before you make pivoting.
Regards,
Stefan Hess
Edited by: stefanhess on Nov 5, 2008 12:48 PM

Similar Messages

  • How to set up row-level data security in BO XI r2

    I need to get Data/Row level security into my BO XI r2 report.
    A logged in user should be able to view info on pertaining to him without refreshing it.
    how do i incorporate this feature into my report?
    its possible to do this by setting a filter using the currentuser() function.
    however it requires a refresh of the report.
    hence the new user shall be able to view the data of the previous user. i need to enforce more security on the data. How do i do this???

    Hi Anamika, here is a sample of what the cv_security view might look like:
    create or replace view cv_security
    as
    select distinct sec."gid", sec."uid", sec."from", sec."to"
    from
    -- All users where NO LIMITS APPLY (sg.group = 1)
    (select distinct
    sg.group_id as "gid",
    sg.user as "uid",
    '----' as "from",
    'ZZZZ' as "to"
    from dual sr, sec_groups sg, sec_users su
    where su.user(+) = sg.user
    and su.status = 1
    and sg.coding = 'GL'
    and sg.group = 1
    union all
    --All users with specified sec_ranges
    select distinct
    sg.group_id as "gid",
    sg.user as "uid",
    case when sr.from is NULL
    then ' '
    else sr.from
    end as "from",
    case when sr.to is NULL
    then ' '
    else sr.to
    end as "to"
    from sec_ranges sr, sec_groups sg. sec_users su
    where su.user(+) = sg.user
    and su.status = 1
    and sg.coding = 'GL'
    and sg.group_id(+) = sr.group_id) sec
    grant select on cv_security to ROLENAME
    Notes about cv_security:
    1) For those users with NO LIMITS APPLY (i.e. Admin staff) hard code an absolute range of RC codes from '----' to 'ZZZZ' to ensure you trap all possible alpha-numeric values.
    2) For those users with NO LIMITS APPLY (i.e. Admin staff) substitute the sec_ranges table with dual
    3) su.status = 1 to a filter to report on only active users
    4) sg.coding = 'GL' is assessing the General Ledger coding dimension of the multi-dimensioned security matrix of our Financial system (this may not apply to you)
    Responses to your questions:
    Q- Does it involve self join between view cv_secured_detail? A- Yes, the 1:N cardinality is a self join between view cv_secured_detail and itself.
    Q- What is the difference between steps 3) and a) below it. A- Step 3a) is simply the act of importing the cv_secured_detail Oracle View as a BO Universe Class, with it's columns known to the BO Universe as Objects
    Q- Can the tables from which report data is fetched be included in the Universe? or should they be part of cv_secured_detail view.
    A- I'm not sure if I understand your question, but I might phrase it another way - Once you create the cv_secured_detail view, and the Universe from this view, with the user = 'BOUSER' limiter. The universe is then used to design the CR, by virtue of it belonging to the CMS Repository, you as the report designer have to log into the CMS repository using your LDAP credentials, if a match is found against the cv_security view your data is automatically row-level secured. In outher words, whatever is declared in the view, is in the universe, and is ultimately available to the report.
    Does this help?
    Bill.

  • Help with implementing Row Level Security in Interactive Reporting

    We're deploying Hyperion BI+ 9.3.1, using Workspace and Interactive Reporting. I'm researching how we can use the Workspace row level security option. I've read what's available for documentation in the Workspace Administrator Guide and the Interactive Reporting Users Guide. I understand the concept of setting up rules with row_level_security.bqy, but I'm confused about where these tables should go and what actually happens when I go to Workspace > Administrator > Row Level Security and turn it on.
    The Administrator's Guide tells me the "properties" are stored in the repository, but the "rules" are in the "data source". Does that mean my BRIOSEC* tables go in the database I'm running my reports from? If so, then what's the data source I'm filling in on Workspace > Administrator > Row Level Security?
    I have many different database connections going to different Oracle and SQL*Plus instances, and I don't want to apply row level security to all of them. How does Workspace tell the difference between them? If I enable rules but create a report from a database that doesn't have rules defined for it, what happens?

    The 3 tables used with the RLS are stored in the same schema as your repository by default.
    The RLS store all the Rules for any database that you are using.
    You define the rules based on the tablename (owner.tablename) and the column name.

  • Object Level Security,Data Level Security&Row level Security

    can anyone explain main difference between "Object Level Security,Data Level Security & Row Level Security " and how to implement.
    Thanks in advance,
    Kumar

    Hi Kumar
    Dashboards, Reports, Guided Navigation Links, Texts, briefing books are all Dashboard OBJECTS which are available at UI level of OBIEE..if you restrict them Say User 'A' wants to see 2 Dashboards and USer 'B' Wants to see 1 Dashboard....these settings & permission u r restricting in Object level called Object Level Security
    lly datalevel security is restriction of Data.. consider the same above example and User 'B" wants to see 2-3 regions data where as User A will see only Single Region Data..which you will do/restrict at logical tables, using variables..
    Row level security: http://groups.google.com/group/obiee-enterprise-methodology/browse_thread/thread/131ee938a5aefde0 refer this link, clearly explains you
    Please mark Correct or helpful if this clears

  • Row Level Security not working for SAP R/3

    Hi Guys
    We have an environment where the details are as mentioned below:
    1. Crystal Reports are created using Open SQL driver to extract data from SAP R/3 using the SAP Integration Kit.
    2. The SAP roles are imported in Business Objects CMC.
    3. Crystal Reports are published on the Enterprise as well.
    3. Authorization objects are created in SAP R/3 and added as required for the row level security as mentioned in the SAP Installation guide as well. The aim is when the user logs into the Infoview and refreshes the report he should only see data that he is meant to so through the authorization objects.The data security works very much fine when the reports are designed directly on the table but when the reports are built on the Business View it doesnt work hence the user is able to see all data.
    Any help in this issue is greatly appreciated.
    Thanks and Regards
    Kamal

    Hi,
    In order for row level security to work for you using the OpenSql driver, you need to configure the Security Definition Editor on your SAP server.  This is a server side tool which the Integration solution for SAP offers as a transport.
    This tool defined which tables are to be restricted based on authorizations.
    However since you are seeing the issue on reports based on Business Views, you need to identify whether the Business View is configured in such a way where the user refreshing the report is based on the user logging into Infoview.  If the connection to your SAP server is always established with the same user when BV is used then you security definition is pointless.
    You can confirm this by tracing your SAP server to identify what user is being used to logon to SAP to refresh the reports.
    thanks
    Mike

  • Pl sql row level locking with wait ?

    Hi,
    I am using oracle 10g.
    I am new to Oracle locks. I have two tables Table1(id_no, employee, salary) and Table2(id_no, employee, salary).
    I need to pull any requested row from Table1 into Table2 only once on demand. I have a procedure to pull data and there could be more than one requests try to call same procedure to pull a row from Table1 into Table2 at any given time.
    I coded below to achieve row level lock. if one transaction gets row level lock on Table1 at 2, so other Transactions should wait till the lock is released at line 2 or 5 to avoid duplicates.
    But below code is not working, I am getting duplicates when I call this using two concurrent java threads.
    How do I control this concurrency issue so that I can avoid duplicate entries in Table2. Could any one please help?
    1.begin
    2.select 0 into emp_cnt
    3.from Table1 where id=id_no
    4.for update;
    5.update Table1 set employee='xyz'
    6.where id=id_no;
    7.select count(*) into table2_cnt from Table2 where id=id_no;
    8.if(table2_cnt =0) then
    9.code to insert above row from Table1 to Table2;
    10.end if;
    11.commit;
    12.End;
    Edited by: 980916 on Jan 9, 2013 5:48 PM

    Welcome to the forums and welcome to Oracle.
    Lets establish one thing right from the beginning ... the Oracle Database is not a Microsoft product.
    There is no general reason to use row level locks, you should not want to use row level locks, you don't need row level locks, and you will almost never have any valid reason to consider row level locks.
    That said there are two situations were it may be necessary to lock a row prior to an update or delete (possibly in a merge) and in those cases you want to use the built-in SELECT FOR UPDATE syntax. (Demo here: http://www.morganslibrary.org/reference/deadlocks.html#dlfu). But we should be clear here ... one rarely needs to use this locking mechanism as the chances of a collision in a well designed application are essentially zero.
    Also as you are new to Oracle please explore the dynamic performance view V$RESERVED_WORDS and do not name objects, columns, etc. with reserved word names not that there is an excuse in any product to name a column "ID." Something Joe Celko has railed about for decades and a tradition I think we should all follow.
    In the case of your posted code example (btw please read the FAQ and learn how to use tags) the solution is SELECT FOR UPDATE if locking can be justified which is unlikely.
    Edited by: damorgan on Jan 9, 2013 6:11 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get a row level share lock

    Is it possible to acquire a row-level share lock, which would do all of the following?
    1. Prevent others from updating that row.
    2. Allow others to read that row.
    3. Allow others to update other rows in the same table.
    I have the following scenario where two transactions need to lock eachother out:
    Set-up:
    Insert into TABLE_A(value_a) values ('ok');
    Insert into TABLE_B(value_b) values ('ok');
    Transaction A:
    Select value_b from TABLE_B
    If value_b = 'ok', update TABLE_A set value_a = 'not ok'
    Transaction B:
    Select value_a from TABLE_A
    If value_a = 'ok', update TABLE_B set value_b = 'not ok'
    If transaction A runs first then the end result is "not ok" only in TABLE_A.
    If transaction B runs first then the end result is "not ok" only in TABLE_B.
    If the two transactions run concurrently, it is possible to get "not ok" in both tables. This is what I would like to prevent.
    One way to get what I want is to use "select for update":
    Transaction A:
    Select value_a from TABLE_A for update
    Select value_b from TABLE_B for update
    If value_b = 'ok', update TABLE_A set value_a = 'not ok'
    Transaction B:
    Select value_a from TABLE_A for update
    Select value_b from TABLE_B for update
    If value_b = 'ok', update TABLE_B set value_a = 'not ok'
    This way both transactions won't perform their update unless they know that the result if their select will still be the same after they commit. However, by using "select for update" Transaction A has gained an exclusive lock on the TABLE_B row. If a Transaction C with the same contents as Transaction A happens concurrently, then the two will block eachother even though all they both want is to read data from the same table.
    Another way is to use "lock table", however using that would block out not only writes to a specific row, but writes to all rows in the table. (In my example there is only one row, but obviously that's just a simplified example.)
    I have looked at the "serializable" isolation level, but that doesn't seem to help because the queries and updates involve more than one table.
    I know that "reads don't block writes" is a fundamental part of the Oracle design that makes Oracle what it is, but is there any way I can explicitly make it happen anyway? Or can anyone see some other solution to what I'm trying to achieve?

    Let me give a more real-world example to show what I'm talking about.
    Imagine a simple bug-reporting OLTP application. Each bug has 3 fields:
    1. Description
    2. Resolution
    3. Status (open/closed)
    The application also has some rules:
    A. If the Status is "closed", Description and Resolution cannot be changed.
    B. In order to change the Status to "closed", both a Description and Resolution must be specified.
    Now as long as only one person at a time updates a bug, everything is fine. However, if one person switches the Status to "closed" while another concurrently blanks out the Resolution you end up with a closed bug that has no Resolution. This is why some locking is necessary.
    If Description, Resolution, and Status are all stored in the same table row, then it makes sense for each transaction to simply select the whole row FOR UPDATE, and then UPDATE it after it ensures all the rules are passed. However, in my fictional bug-reporting application they are all stored in separate tables. Now, the transaction that is making the change to Resolution could lock the row in the Status table FOR UPDATE (as everyone so far has suggested). Transactions making a similar change to the Description should then also lock the row in the Status table FOR UPDATE for the same reason. The end result of this is that Description changes and Resolution changes lock eachother out (can't happen concurrently, are serialized) when they don't need to be. Description changes and Resolution changes don't affect eachother, but because they both need to (exclusively) lock the same row, they are serialized.
    If there was a way to acquire a share lock on the row in the Status table, then Description and Resolution changes would use that and not affect eachother. Status changes would still acquire an exclusive lock on the row, and would be blocked by (and block any further) concurrent Description and Resolution changes. This would be ideal.

  • Row level locks

    Hi All,
    Version - Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
    I have a card's data in a table. Whenver a two different sessions/threads selects the data sometimes they get the same card.
    Now I need to lock the record. If Thred-1 selects then it will lock the first records and thread-2 must select the second record as the first record is locked by thread-1.
    I have written a piece of code , at first session it locks one record and when second session select it selects no records.
    I have takem MIN group function because I want the cards to be selected in order.
    Can you please tell where is my code went wrong or need some changes. Data and code is given below.
    SQL> SELECT * FROM crm_pps_cards_sz ORDER BY 1;
    CARD_NO          PIN  SERIAL_NUMBER DATE_CREATED DATE_MERGED DATE_ALLOCATED DATE_REGISTERED
    6338079966430591 9985 9950013661    12/06/2011                             
    6338079973369543 6858 9950013660    12/06/2011                             
    6338079978994154 7144 9950013655    12/06/2011                             
    6338079981471778 7631 9950013654    12/06/2011                             
    6338079986365041 7849 9950013657    12/06/2011                             
    SQL>
    Thread - 1
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
    Connected as crm
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2    l_rec crm_pps_cards_sz%ROWTYPE;
      3    CURSOR c IS
      4      SELECT * FROM crm_pps_cards_sz t WHERE t.card_no =
      5      (SELECT MIN(card_no) card FROM crm_pps_cards_sz)
      6      FOR UPDATE NOWAIT SKIP LOCKED;
      7 
      8  BEGIN
      9    OPEN c;
    10    FETCH c
    11      INTO l_rec;
    12    CLOSE c;
    13    dbms_output.put_line('Card Allocated ' || l_rec.card_no);
    14 
    15  END;
    16  /
    Card Allocated 6338079966430591
    PL/SQL procedure successfully completed
    SQL>
    Thread - 2
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
    Connected as crm
    SQL> set serveroutput on
    SQL>
    SQL> DECLARE
      2    l_rec crm_pps_cards_sz%ROWTYPE;
      3    CURSOR c IS
      4      SELECT * FROM crm_pps_cards_sz t WHERE t.card_no =
      5      (SELECT MIN(card_no) card FROM crm_pps_cards_sz)
      6      FOR UPDATE NOWAIT SKIP LOCKED;
      7 
      8  BEGIN
      9    OPEN c;
    10    FETCH c
    11      INTO l_rec;
    12    CLOSE c;
    13    dbms_output.put_line('Card Allocated ' || l_rec.card_no);
    14 
    15  END;
    16  /
    Card Allocated
    PL/SQL procedure successfully completed
    SQL> My concern is that it must allocate in the order
    6338079966430591
    6338079973369543
    ....

    It is because MIN(ard_no) is able to find value from table which is locked by you thread 1 and thread 1 mentioned NOWAIT thus it thread 2 went out without getting anything.
    Please check my reply to your duplicate thread "row level locking" .

  • Row Level Restrictions on DeskI Report not working under InfoView

    When running/refreshing DesktopIntelligence XI r3 (Full Client) reports under InfoView, the row-level restrictions applied in the universe are not being included in the SQL (additional filtering is NOT happening). However, if a user creates a report using the same universe in WebIntelligence or if the user runs the same report in DesktopIntelligence, the row-level restrictions are working.
    It strikes me that the problem has to do with security rights granted (or not granted), but I can't figure out which settings would allow the proper running of a DeskI report under InfoView.
    Thanks for any assistance rendered!

    Mike,
    Do people connect to Infoview and Deski using the same authentication method and the same username?
    How does this compare to how your data restrictions are configured?
    Are you using @Variable('BOUSER') restrictions? Have you taken domain into account e.g. "Domain\UserName" vs "UserName"?

  • Relationship between header and row level data.

    Hi all
    I need to know how to relate a field in the header level and the row level...
    On my row level i want the route id to be related to the route name field at the header level...instead of showing this route id  it must show only the header so...based on the row level data the header must change...
    I tried insertin the field but when i do a relate to on either fields its showing me only fields on that catagory ( Header only or Row Level only)
    Thanks

    The Header is evaluated and printed first and then only Repetitive area is computed and printed. You cannot try to arrive header based on the Repetitive area.
    Please explain in detail which screen etc.. so that we can suggest some work arounds

  • SBO - Approval Procedures at row level

    Does anyone know how to create an approval procedure that is triggered by a row field. For example if I want an approval procedure that verifies discount percentage in row level.
    There must be a workaround, cause I know this is not a functionality in SBO.
    Thanks,
    Hernán Baudrit

    The way you could solve this is to create a UDF at Header level and link a formatted search which loops through the number of rows in the transaction and returns TRUE if for example the Discount % is greater than allowed.
    The coding should be something as follows:
    Declare @Counter as integer
    Set @Couter = 0
    Declare @TempTable TABLE (STAT varchar(50)) -- Temporary table holding results of loop
    Declare @LoopFor as integer
    Set @LoopFor = (select (*) from (select T1.DocEntry
                                                              from INV1 T0 join OINV T1 on T0.DocEntry = T1.DocEntry
                                                                      where T0.DocNum = $[OINV.DocNum])
    While @Counter < @LoopFor
    BEGIN
          Declare @Disc as integer
           Set @Disc = ( select T1.DiscPrcnt
                                            from INV1 T0 join OINV T1 on T0.DocEntry = T1.DocEntry
                                                       where T0.DocNum = $[OINV.DocNum]) and T1.LineNum = @Counter
         IF @Disc > 20
         BEGIN
                  INSERT @TempTable VALUES ('TRUE')
         END ELSE INSERT @TempTable VALUES ('FALSE')
    @Counter = @Counter + 1
    END
    SELECT Distinct 'TRUE' from @TempTable where STAT = 'TRUE'
    Please note that the coding is not 100% accurate but should give you an idea of how to work around the problem.
    Next you should write a simple validation query on the value of the UDF to check whether it is set to 'True'.
    I hope this helps.

  • How to restrict table data at a row level?

    Hi everybody,
    I need create a database user and restrict his data access to certain tables.
    What is the best way to do this?
    Eg Table Emp has two columns, sal and dept. Sal has three distinct values: 500, 1000, 1500.
    I need to make it so that new_user can only see the data in table emp where the sal value = 500.
    Many thanks
    Rup

    You can use row-level security (VPD) for this sort of thing, so you assign a policy to the table that restricts which rows a particular user can see.
    You can also roll your own solution by creating a view on the table and granting the user access to that view rather than direct access to the table.
    Justin

  • Flex updates at a row level in a grid

    I needs to updates row level in a grid for frequent basis, Also i don't want to Refresh the Grid.
    Is there any method i can use ?
    Using flex Grid -> updates at a row level in a grid

    I mean DataGrid. I am trying to change the data rows based on realtime data feed.
    First time i'll add all the Employees in the Grid. Later i'll get indivual request will change only Status column.
    Is there is any other way i can update with out refresh in datagrid.
    <mx:DataGrid 
    id="dg" height="260" width="900" x="0" y="20">
    <mx:columns>
    <mx:DataGridColumn headerText="EmpID" dataField="EmpID" width="10" visible="false"/>
    <mx:DataGridColumn headerText="Emp Name" dataField="Emp Name" width="110"/>
    <mx:DataGridColumn headerText="Status" dataField="Status" width="80"/>
    </mx:columns>   
    </mx:DataGrid>

  • Row level security at universe design level

    Hi,
    I am creating a Universe layer on top of non SAP OLAP cube ( from MS Analysis Services 2005 ) .
    My concern is that can we maintain the row level or data level security at universe design level or if i am using that universe in creation of WEBI report so is there any possiblity to maintain this security at WEBI level.
    Regards,
    Mishra Vibhav.

    Thanks for the reply.
    Much Appriciated.
    My only concern is that i read in the Universe Designer developer guide that it does the row level security so can eloborate a bit about how we maintain at Universe level.
    Warm Regrads,
    Mishra Vibhav

  • How to implement row level secuirty at universe level

    Hi All
    How can we implement row level security in universe ?
    John

    HI,
    Can we try this?
    Open designer >>tools>>Manage security>Manage access retrictions
    Click on "new" under available restrictions area .
    Select "rows" tab click add select the table and an appropriate where condition.
    Click ok .
    Add a user\group on which the retriction is to be imposed Click Ok.
    Hope this will help
    Kultar

Maybe you are looking for

  • Dock sticks to left side of screen

    Hi everyone well in the middle of copying 100GB of data the finder crashed and so I held the power button of my macbook pro in order to reboot but when it came back to the OS again , the dock stuck to left side of the screen In order to inform you I

  • Any hacks to modify default settings in common adjustment settings?

    Hey folks, I've just recently upgraded to Aperture 2.0 and am (thankfully) seeing many improvements both in performance and features. However, it seems that with the new version, Apple has decided to not allow you to customize any of the default sett

  • Screen I/O

    Hi All, I have to develop a screen where in user can modify the value or can enter a new value. The pre-requisites are Input Screen: Warehouse (T329D-LGNUM) Source storage type (T329D-VLTYP) Destination storage type (T329D-NLTYP) Upon entry, the prog

  • Cs3 to cs2 adding strokes to most shapes

    The problem seems to be the ID on my computer at work. If I open an inx on another computer, all is well. On my computer I get strokes on many of the outlines (text boxes, graphics boxes). I tried trashing the prefs. No luck. I tried restarting with

  • Cd sharing

    looking for help to install iWork on a MacBook Air from the optical drive on a MacBook Pro.