Derived logical column using Row values in OBIEE11g

Hi Experts
I have a requirement whereby I need to create say 100 new logical column in obiee using the row values of one dimension.
For eg. say I have dimension values like A and B in one of the table ,  I need to create logical columns like C=A+B and D = A/B and E = AxB as such when the user drags this to the analysis the calculation should happen automatically.
The problem is they are in the rows and not the coulmn , so I can't do plain calculation like sales per Unit = Sales/Units - as Sales and Units are two differnet measure column.
How to achieve this in RPD.
Regds

Hi
Pls. find below the examples :
You have a dimesion called KPI which has soem KPIs.
KPI           Measure Values
KPI1          10
KPI2          20
KPI3          50           
etc
Now I need to calulate a driven KPI i.e KPI10 which is KPI10 = KPI2/KPI3 , and I need to do that in RPD.
I know I can do it in Front end analaytics by using Pivot or Selection steps . But I want to do it in RPD.
Regds

Similar Messages

  • Changes to Derived Logical Column not reflected in Answers

    Before I go off my rocker and stab myself with my IPhone lightsabre... :-)
    I created a new logical column for an existing table in my BM, deriving from an existing column (a datetime field called ESTIMATEDCLOSE) as follows:
    MONTHNAME(Sales.OPPORTUNITY.ESTIMATEDCLOSE) || ' - ' || CAST(Year(Sales.OPPORTUNITY.ESTIMATEDCLOSE) AS CHAR(4))
    ...which should give me something like "Jan - 2008". The problem is that it returned something like "2008/01/31 00:00:00" in Answers - completely unexpected.
    I decided to start out small and try something simpler, changing my derived column to be only Sales.OPPORTUNITY.ESTIMATEDCLOSE. This returned "2008/01/31 00:00:00" in Answers - sort of expected.
    Then I changed it to MONTHNAME(Sales.OPPORTUNITY.ESTIMATEDCLOSE). This also returned "2008/01/31 00:00:00" in Answer!!!
    It almost seems as if a derived logical column is cached in some weird way and changes to the formula is not reflecting in answers. Thinking that something so simple must work and I made a simple mistake somewhere I have spend a good part of the past day playing around with this and trying every possible solution I can think of - no luck. The odd thing is that I would rename my logical column and this will be reflected in Answers, but changes to the derived expression is not reflected.
    - I deleted the column and started all over - no luck
    - tried creating derived columns using different datetime expressions or even just concatenating strings to each other - no luck.
    - Restarted all the Oracle services, thinking it's a cach'ing issue - no luck.
    - I rebooted the server - no luck.
    Once, when I started out with only MONTHNAME(Sales.OPPORTUNITY.ESTIMATEDCLOSE) I got back correct values in Answers (Jan, Feb, Mar..) and I thought the problem was finally gone. So I added || ' - ' || CAST(Year(Sales.OPPORTUNITY.ESTIMATEDCLOSE) AS CHAR(4)) to the derived formula. Guess what, Answers kept on giving me back only the Month names, completely ignoring my updated formula.
    Anybody else ran into this problem? Something so simple should surely work...

    John,
    Yes, cleared the cache (from Dashboard Administration) and also used nqcmd Call SAPurgeAllCache. Restarted BI Server. Still no luck.
    I tried your formula and then only got back "2008/01/31" (just the date without the timestamp) - very strange.
    Then I noticed the following amazing thing (by accident):
    I started with a request in Answers that does not contain my derived column and then add my derived column to the report. The text would be all wrong in this column (Jan, Feb, March). Then I add the same column again to the report and the second added column will magically show the correct strings (Jan - 2008) !!! Even stranger is that the moment I added the same column again to the report, the text on the first column would also magically jump to the correct values (Jan - 2008).
    I did a bit more testing and created a blank request and added my derived column as the only column - this time it will show the correct values immediately. It does seem like it's tied to the content already in the request. I went a step further and saved my buggy request and added it to a Dashboard - it worked perfectly in the Dashboard.
    Must be something buggy here in Answers when working with derived columns. I'm on 10.1.3.4...

  • Logical column using data source from 2 generations of same hierarchy

    Hi experts,
    I'm using Essbase as my data source in CEIM physical layer,
    and I have a hierarchy called "Entity" which contains different level of companies,
    in Generation 2 I have only one member called "group totals" and in Generation 3 are 5 members representing 5 different industries,
    I need to use these total 6 members as slider on the top of the view(a Dial),
    and the measure I want to show is scaled in rate, which I can't simply sum up those five members in Gen3 to get Gen2 measurement.
    I tried to create a logical column using Entity-default(the alias table) as datasource, it worked but was not sorted in outline style.
    I tried to sort them using calculate items in selection steps, but calculate items seemed cannot be shown as section or slider.
    So I wonder if I can simply create a logical column that sourced from different generations(in this case, my Gen2 and Gen3) of same hierarchy,
    is it possible to do such things?
    Thanks for reply.

    You could try General Database Discussions the main db foum.
    What are you using to migrate your database? Why is it being mapped from varchar2(8) to varchar2(32). It sounds like someone/something is intervening here.
    Barry

  • DIfference b/w expression builder logical column and derived logical column

    Hi Experts,
    Can anyone tellme the difference between expression builder (when we double click the logical column) of derived logical column and expression builder of logical column( we see this in column mapping of LTS) ??
    Thanks in advance.

    Hi,
    Formula given in the "expression builder of logical column( we see this in column mapping of LTS)" is performed on the physical layer of the RPD. I guess it is calculated in the Physical Query which is good for performance.
    Formula in the expression builder of derived column is calculated in the BMM layer i.e in the logical query.
    Regards,
    Amrutha.

  • How to use row values in Presentation or Administration for calculation

    Hi All,
    I am working on OBIEE, I want to calculate / or % on two rows.
    e.g. In my report row 3 is value 20 and row 5 is value 200.
    In same column row 6 I want to display *(row 5 / row 3 )* 200/ 20 i.e. output should be 10.
    Else can I use variable to and assign value to variable.
    I tried but giving error :
    CASE
    WHEN "Report Structure".Seq = 101 and Currency.Code = 'SAR' THEN
    "Fact Report"."Actual PTD" ,
    VALUEOF("col10") = "Fact Report"."Actual PTD"
    ELSE "Fact Report"."Actual PTD"
    END
    I am trying to store row value to repository variable to solve above problem.
    My question is how to assign value to variable.
    Please guide me to solve this problem.
    Thanks In advance
    Regards
    Dixit

    When you want to compare two row values, you can use the lag and lead analytical function of oracle.
    lag and lead are analytical functions that can be used to get the value of a column in a previous/next row.
    I have made just an example on my blog for a period to period comparison on OBIEE
    http://gerardnico.com/weblog/2009/04/17/obiee-period-to-period-comparison-with-the-analytical-function-laglead/
    And if you want an example on Oracle :
    http://gerardnico.com/wiki/dw/analytic_function/analytic_function_lag
    But I don't understand completely your problem. What about the row 1, 2, 4 ? I don't really see you report.
    What I see, is that you have a problem with the currency.
    You say :
    I am trying to store row value to repository variable to solve above problem.For me, it's not possible...
    Success
    Nico

  • BMM derived logical column - bounced visit

    In Web Metrics, a "bounced visit" is when a session views only one page on a website and then leaves. In my fact table, I capture the "total pages" viewed for each session and I define this metric in my Business Model with an aggregation rule of "sum". I'm trying to use this metric to derive the "bounced visit" metric but I'm running into issues.
    Session ID Total Pages
    1179860475     5
    1179861625     1 <= This is a bounced visit
    1179861920     7
    1179866260     2
    1179868693     13
    If I define "bounced visits" as
    CASE WHEN "total pages" = 1 THEN 1 ELSE 0 END
    What I see in the session logs is:
    CASE WHEN sum("total pages") = 1 THEN 1 ELSE 0 END
    The aggregation of the "total pages" is being done first and then the derived metric is being calculated. This leads to incorrect results. Is there anyway of solving this in the business model? I know that I can go back to the ETL, calculate a "bounce visit" metric, store it in the fact, build out aggregates, etc. I was looking for a short term solution.
    Other things I've tried:
    1) make a copy of the "total pages" column and turning off the aggregation, call it "total pages - no aggregation"
    this leads to queries of the form:
    select distinct T22583.TOTAL_PAGES as c1
    from
    WEB_SESSIONS_A1 T22583
    order by c1
    2) Create a logical column based on "total pages - no aggregation"
    bounced visit = CASE WHEN EnterpriseWarehouse."Web Sessions"."Total Pages - no aggregation" = 1 THEN 1 ELSE 0 END
    This leads to [nQSError: 14020] None of the fact tables are compatible with the query request Web Sessions.bounced visit.

    Cool. I now have two approaches to solve the problem. Thanks for your help. Using your technique, the new logical column shows up in the Logical Table Source screen and I can define an expression for that logical column. The second approach leaves the table type as a Physical table. This has some benefits as I've noticed that the queries that are generated when the table type is defined as a Select statement end up retrieving all of the columns, even though I only needed to act on one of them.

  • Populate columns with row values in Sql Server Reporting Services

    I have got a dataset with 2 columns named Row and Title. There are 8 rows in this dataset and I want to display those 8 titles within columns in a table. So I create a table with 8 columns and set each column's expression to
    =LookUp(Fields!Row.Value,1,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,2,Fields!Title.Value,"Titles")
    =LookUp(Fields!Row.Value,3,Fields!Title.Value,"Titles")
    However only the first column displays a title. The other 7 display nothing. Is my expression wrong?

    Hi,
    Is the row datatype non-numeric?  Maybe the lookup is failing for that reason.  You coulr try adding a conversion to the field:
    =LookUp(cint(Fields!Row.Value),1,Fields!Title.Value,"Titles")
    Could you, perhaps, instead use a tablix table and put the Title column on the row group?  That would pivot the data the way that you want it.
    Mark

  • Logical column using union

    Hello All,
    I have posted a similar thread before,now the requirement is little different ,so i am posting as a new thread
    I have a column organization code with values 1000,1001,1002,1003,1004,1100,1101,1200,1201,1300,1301 ....
    My customer asked me to create groups like this
    Group1 = All 1000's,All 1200's
    Group2 = All 1000's,All 1300's
    Group3 = 1001,1003,1004,1201
    Group4 = 1002,1200,1201,All 1300's
    and one logical column should contain all these groups.
    create a logical column Logical_Groups which contain all the groups as values.
    Its very urgent.please help me out.
    Thanks in advance.

    Hi,
    Thanks for your replies.I have tried your solution(yet to try Nico's ).
    I have created a logical column like this.
    CASE WHEN
    "TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" IN ('1513', '1532', '1535', '1593') THEN 'Tina' else ''end||''||
    case WHEN ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '20%') OR ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '12%') OR ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '36%') THEN 'Jan' else ''end||''||
    case WHEN ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '20%') OR ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '12%') OR ("TestDB".""."Nat_RBM"."PROJECTDATA"."ORG_CODE" LIKE '75%') THEN 'Zack' else'' end
    The results its giving is:
    Jan : All 3600's
    Jack : All 7500's
    Tina: '1513', '1532', '1535', '1593'
    JanJack : All 2000's,All 1200's
    But,what i want to acheive is this
    Jan : All 2000's, All 1200's , All 3600's
    Jack : All 2000's, All 1200's, All 7500's
    Tina: '1513', '1532', '1535', '1593'
    Is it possible to acheive this?
    Thanks in advance

  • OBIEE 10g - Logical column with static value

    I created a logical column with static numeric value in it and added it to presentation layer. The column is not showing up in Answers. All other columns I added are showing up. The issue is with this one only.
    I have verified permissions on this column in presentation layer. I tried reloading server metadata in answers, restarting all services but it didn't help.
    One thing I noticed this column is showing fx icon instead of Σ icon.

    Kid,
    The fx means it is a calculated column/formula and the sigma means that you've added some aggregation type to the column.
    Either way it shouldn't matter and your column should be showing up.
    I would attempt to create a new column and in the fx field try entering static text and see if that allows the column to be visible after dragging it to the presentation layer subject area.
    Also what is the value that you are adding?

  • One logical column used twice in the prompt

    Hello Gurus,
    I have a report which is presently showing
    Sales across country
    COuntry Name | Sales
    USA 100$
    Japan 100$
    Country NAme | Statename 1 | Satename 2 |
    Usa 50$ 100$
    But State 1 and state 2 are one logical column called state in the RPD.
    User should have the ability to slect some states in state1 prompt and slect some states in state 2 prompt.
    If it is not clear let me know?
    With regards!
    Alan

    In the prompt take the state column... edit the fx as
    Case when 1=0 then "any varchar column name" else "State" end
    Drag the same column twice in the prompt.. edit the fx as
    Case when 1=0 then "any *other* varchar column name" else "State" end
    for the both the columns define the presentation variable pv_state1 , pv_state2
    so now you have the same column being used in prompts for two states..
    In the Report filter add the filters as
    state is equal to pv_state1
    OR
    state is equal to pv_state2
    Note-> to add presentation variable in filter, you have to click on Add-->presentation variable
    Your report is ready...
    Hope it helps...
    Thanks
    Ashish Gupta

  • Derived Logical Column throws an error

    Hello
    I get the 46036 error from Answers when I add a field that I created in the BMM of the RPD. We are on OBIEE 10.3.4.2. I added a logical column to a table and applied a filter for a particular age band. I can check the change in without any errors but when I use that field with that expression I get the nQSError.
    *[nQSError: 46036] Internal Assertion Condition pExpr->IsValueExpr(), file*
    Ahsan/Naveen, any ideas on this? You guys have been always helpful with my questions.
    Thanks,
    Dan

    Not sure if this helps but found a few things online on this..may just require a resave or re-import of the specific report (http://tipsonobiee.blogspot.com/2009/06/error-nqserror-46036-internal-assertion.html). If you are on Solaris 64 there is also a bug associated with this. "[nQSError 46036] Internal Assertion Error" After Upgrading to OBIEE 10.1.3.3.2 [ID 566463.1] suggesting to change the following parameter:
    A workaround is to make only off line changes.
    The bug states the following:
    "The solution was to set the following in NQSConfig.INI
    SERVER_THREAD_STACK_SIZE = 1024 KB"
    This is not the same exact OBIEE version. Try these 2 suggestions and let us know how it goes.

  • Accessing logical columns using metadata table

    Hi,
    I have a requirement to store data coming from multiple sources in various format into single table as the number of tables required is not determinable at development phase. Hence I have defined 2 tables,
    1. Metadata table storing the information about logical columns in the incoming data.
    2. Raw generic table where the actual data would be stored.
    While accessible the logical data first I need to access the metadata table to fetch the column details and then access the raw table to provide actual data in those columns. Even though this option is available the code might not remain readable as need to use actual raw table column names in the code.
    I have thought of view based access but again number of views required is not known at development time. Is there any option/feature available which would be able to provide logical view for the raw data?
    thank you in advance.

    Hi
    Firstly, this sounds rather messy and is not something I would consider doing - but I shall give you the benefit of the doubt that all other options have been exhausted.
    A way I can think of is that you could define your metadata a bit like the oracle data dictionary, then you could use something like APEX where you can use dynamic SQL to show a report on the data. Imagine something like this
    DECLARE
    l_sql VARCHAR2(32000);
    BEGIN
    l_sql : = 'SELECT ';
    FOR i IN
    (SELECT column_name
    FROM my_table_data
    WHERE table_name = :TARGET_TABLE)
    LOOP
    IF i = 1
    THEN l_sql := l_sql||i.column_name;
    ELSE l_sql := l_sql||', '||i.column_name;
    END IF;
    END LOOP;
    l_sql := l_sql||' FROM '||:TARGET_TABLE;
    RETURN l_sql;
    END;Obviously you can make stick in predicates etc. if you need to but that would be a starting point?
    Not very pretty though...
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • New Logical Column using repository variables

    Hello all,
    Can anyone let me know how we create a new logical column in OBIEE 11g in the BMM layer using the repository variables..Is there any way/chance to create such new logica columns.If so please let me know how we will be doing that

    This is alwayz possible.
    Here is the syntax.
    CASE WHEN VALUEOF(VAR1) ='ABC' THEN
    "Sample App Lite Data"."".""."F10 Revenue Facts (Order grain)"."Units"
    WHEN VALUEOF(VAR1) ='XYZ' THEN
    "Sample App Lite Data"..."F10 Revenue Facts (Order grain)"."Discnt_Value"
    END

  • Logical Comparisons Using Numerical Values

    Hello:
    I am trying to create an if statement that tests when two variables equal zero. My problem is that I'm trying to use a logical & both variables are numeric, not boolean. Is there another way to do this? My code is below:
    if (released.getX() = 0) & (released.getY() = 0)
    Thanks!

    More precicely with && if the first expression is not true then the second expresion is not evaluated, however if the first expresion is true then the second part must be evaluated to determine if it is true too. Therefore if you have two conditions to check for and you expect one to be false more often then not, then by placing it first in the expresion it could help to reduce overall execution time.
    Secondly you may not always want to use &&. For instance if the expresions on each side of the & invoke a method that does some work before returning a true or false and your code relys on the added work that the function(s) perform then using the && could result in unexpected results.

  • Logical column - Fact measure using Dimension value

    Hello all, I have a Fact table that has a metric (Value) where I have set the Aggregation rule to Sum. Now I'd like to create a metric based on the value of a Product Dimension that joins to this Fact table. So I create logical column that has the syntax - Case When Product_Desc = 'A' then Value else 0 End.
    The issue is in Answers when I bring this new metric in it doesn't bring in the correct value, are there steps I am missing with creating this metric?
    My assumption is if I just bring that new metric in by itself it would return one record - A sum of the Value where the Product = 'A'.
    Thank you

    Hi BRizzle,
    In your scenario, you creatre a calculated measure using the employee dimension, and then this measure show "#VALUE" on the pivot table, right? It seems that it's a limitation of using calculated measures in SQL Server Analysis. Calculated measures cannot
    be secured using Dimension Security in a straight forward manner, in fact they won't be listed at all in the Dimension tab of the role where we define the Dimension security. When such measures are browsed in client tools like Excel, the value that would be
    displayed is an error value like #VALUE. For the detail information about it, please see:
    Limitations / Disadvantages of using Calculated Measures / Calculated Members in SSAS
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

Maybe you are looking for