Logical Column(s) a.k.a. Pre-calculated Measures

I am looking for best practices around logical columns either in Presentation Layer or Business Layer. Specifically I want to know..
1) Is it advisable to have logical columns?
2) How many are good to have? Should one create logical columns for all frequent calculations which are done on dashboards?
3) Are there any performance implications?
4) Can we use Time Series function with logical columns? Like AGO etc.
In short I am looking for intelligent pros and cons of such implementations.
PS: Logical columns are derived from physical columns. For e.g. Profit = Income - Expense.
Regards.

Hi
1) all complex logic should be in the BMM layer in the RPD. Yes, it's advisable to have them in the BMM. Although another good practice is to try to delegate all complex calculations to ETL if possible.
2) As many as deemed necessary. Yes.
3) No, not really. But if you use Answers' logical columns - you have to be creative in propagating them to other reports.
4) Yes you can. But again, this is something that's better to have in the RPD.

Similar Messages

  • Logical Column for calculation

    Hi guru,
    My requirement is we have to display report with Total count of Opportunities , Count new Oppty ( which are created with in 30days from today ) Count Old Opptys ( which are created more than 30days ago and Overdue ( which closed date is > current Date).
    For this requirement I had created one logical column and I am getting error when ever I am using Timestampdiff.
    Could you please let me know how can I create these 3 logical columns in Meta Data.
    I am rally appreciate for your help.

    Here is what you need to do:
    1. Create a Session Variable in your RPD
    2. Check the "Enable any user to set the value" checkbox in the Session Variable properties
    3. In your dashboard prompt, select"Request Variable" in the Set Variable section
    4. Enter the name of your Session Variable in the box that appears
    5. Now you can reference the session variable in the formula of your logical column. Syntax: VALUEOF(NQ_SESSION.YOUR_SESSION_VARIABLE)
    Note: You cannot reference Presentation Variables in the RPD
    -Dave

  • Nested IF/AND/OR in Calculated Measure/Column

    I have the following problem, which I couldn't quite solve in Excel and was wondering whether it can be done in PowerPivot (I failed so far):
    A datasheet with a column "HOUR" and another column "AM/PM". Entries in the first column consist of 1,2,3,4,5,6,7,8,9,10,11, or 12, the second column consists of 'AM's or 'PM's. Together they define the time of an incident (regarding the
    below problem, note that I am not allowed to create a new column in the source datasheet or change existing columns). The below formulas 1.) to 3.) work excellent in Excel for getting '1's or '0's for incidents that happened either between 8AM and 4PM, or
    outside of this time window, as long as I create a new column somewhere in the source datasheet.
    1.) =IF(AND(A1>=8, A1<=11),IF(B1="AM",1,0),0) + IF(AND(A1>=1, A1<=4),IF(B1="PM",1,0),0) + IF(AND(A1=12),IF(B1="PM",1,0),0)
    2.) =--OR(AND(A1>=8, B1="AM", A1<>12), AND(OR(A1<=4, A1=12), B1="PM"))
    3.) =--OR(AND(OR(A1={8,9,10,11}),B1="AM"), AND(OR(A1={1,2,3,4,12}), B1="PM"))
    However, I wanted the "1"s to be summarized - without creating an extra column - as calculated field in a pivot table in Excel. As it turned out, the calculated field option in Excel's standard Pivot table doesn't allow such complex formulas.
    Someone then told me to try PowerPivot. However, the calculated column/calculated measure option in the PowerPivot sheet (once I loaded my data) doesn't seem to support the above formulas either.
    The column headers have the same names as I described above. However, some symbols were not accepted so the relevant ones read now: "[HOUR]", "[AM PM]".
    I tried:
    =IF(AND([HOUR]>=8, [HOUR]<=11),IF([AM PM]="AM",1,0),0) + IF(AND([HOUR]>=1, [HOUR]<=4),IF([AM PM]="PM",1,0),0) + IF(AND([HOUR]=12),IF([AM PM]="PM",1,0),0)
    Error: "Too few arguments were passed to the AND function. The minimum argument count for the function is 2."
    =OR(AND([HOUR]>=8,[AM PM]="AM",[HOUR]<>12), AND(OR([HOUR]<=4,[HOUR]=12),[AM PM]="PM"))
    Error: "Too many arguments were passed to the AND function. The maximum argument count for the function is 2."
    Does anybody know how to translate any of the above formulas into one PowerPivot accepts? or, alternatively, any other way how to achieve the desired results? Thank you for any help on this.

    Hi Natrajx,
    The first of your formulas can be translated into the follow DAX syntax that can be used to define a Calculated Column:
    IF(
    table1[HOUR] >= 8 && table1[HOUR] <= 11,
    IF(
    [AM PM] = "AM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] >= 1 && table1[HOUR] <= 4,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] = 12,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    You could also created a Calculated Field based on similar logic using the following formula:
    SUMX(
    'Table1',IF(
    table1[HOUR] >= 8 && table1[HOUR] <= 11,
    IF(
    [AM PM] = "AM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] >= 1 && table1[HOUR] <= 4,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    +
    IF(
    table1[HOUR] = 12,
    IF(
    [AM PM] = "PM",
    1,
    0
    0
    Note the use of "&&" instead of the AND() function. In DAX, the AND() and OR() functions only support a maximum of 2 arguments. You can use "&&" for the AND operation and "||" for the OR operation. Hopefully
    the DAX examples above will help you to see how it can be applied to your scenario.
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • 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.

  • 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

  • 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

  • Store data in logical column

    I am building a report to calculate the following formula:
    Weekly Raised = Delta (“total defect for CURRENT week” and “total defect for LAST week”)
    Example:
    Current week May 24th, “total defect for CURRENT week” = 30
    Last week May 17th, “total defect for LAST week” = 20
    Weekly Raised = 10
    In order for my formula to calculate correctly, I think I would need logical column to store the data that I need
    I would need TWO logical columns:
    Logical Column number one is to store “total defect for CURRENT week”
    Logical Column number two is to store “total defect for LAST week”
    The physical column that I'm using to calculate the total defect is (SUM("Defect Facts".BG_BUG_ID))
    Can any somebody help me with this?

    Hi,
    pls refer the below link
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html#t11
    in the link ref the section Creating Time Series Measures which will tell you how to create the two basic measures.
    and then right click on the current week measure and go to Calculation wizard.
    then select the last week measure in it and in the next page select change or percent change or what ever you want.
    after that in this newly created measure set the aggregation as sum.
    now you can directly use this newly created measure in your report.
    hope this helps.
    thanks,
    karthick

  • OBIEE Error in Logical column

    Hi,
    I want to use dynamic variable and filter the dates. I am creating new logical column in BMM using the below case statement. I am getting the error.Please suggest me for this issue.
    CASE statement:
    CASE WHEN VALUEOF(CURRENT_MONTH_FNC_STG) = '08 2010' THEN
    "FNC_STG"."A_FNC_INVOICES_T"."INVOICE_CREATION_DATE" BETWEEN ('08/01/2010 12:00:00 AM') AND ('08/05/2010 12:00:00 AM')
    END
    --Here CURRENT_MONTH_FNC_STG is dynamic variable....
    Error:
    [nQSError: 27002] Near <BETWEEN>: Syntax error [nQSError: 26012] .
    Thank U

    Hi...
    if avg sales should be calculated to current month always.. then why don't you apply external filter ..
    i hope you are having time dimension columns like: year and month which is holding values like 2010, 2009.. etc, and 1,2,3,4.. etc..
    If then,
    apply this filter..
    Year = Current_Date
    and
    MonthNumber = Month(Current_Date)
    you can't include those 2 r.h.s values directly..
    click on filter option of year column then > Advance > convert this filter to SQL.

  • Aggregate on logical column

    Hi:
    I was testing two column, ID and Value like this:
    ID   Value
    1     -2
    2     -1
    2      2
    and the aggregate type for <b>Value</b> is Sum. So in the report, it will looks like:
    ID   Value
    1     -2
    2      1
    It's OK. Then I define a logical column, <b>Calc</b> is:
    case when Value < 0 then Value else 0 end
    So I think the computed column should be:
    ID   Value   Calc
    1     -2     -2
    2     -1     -1
    2      2      0
    And then in the report page, it was expect to showed:
    ID   Value   Calc
    1     -2     -2
    2      1     -1
    But actually, I got:
    ID   Value   Calc
    1     -2     -2
    2      1      0
    Why this happened?
    Thanks!

    This is basically good example for condition after aggregation. Condition is applying after the total, thats why it is showing 0. For the 2nd row sum is 1 which is greater than 0, so it is showing 0.
    If you want to avoid this, One solution would do the calculation in the RPD, Use physical columns in calculations. You will get the out put as expected.
    - Madan

  • 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?

  • New Logical Column Datatype

    I am trying to add a new logical column to the BMM layer. But by default the data type is showing as UNKNOWN and is grayed out. How can i change it? I am trying to perform a calculation on the new column added.
    Thanks!

    Hi,
    user10797474 is correct. It takes the default datatype depending on your logic. So in the properties of the column, check the "Use existing columns as source" and then click the button with the three dots. Then create your logic in this expression builder. Select the columns and formulas from the list so you do not have to type them. Once you save from the expression builder, the default datatype should be set.
    Rajesh

  • YTD Actual and Budget Formula in Logical column

    Hello,
    Im trying to replicate a report from Oracle EBS into OBIEE.
    I have to create logical columns for YTD Actual , YTD Budget,Current month actual, Current Month Budget using GL_BALANCES table. The formula currently im using is,
    YTD Actual:
    CASE WHEN GL_BALANCES.ACTUAL_FLAG = 'A' THEN (GL_BALANCES.PERIOD_NET_DR - GL_BALANCES.PERIOD_NET_CR)+ (GL_BALANCES.BEGIN_BALANCE_DR - GL_BALANCES.BEGIN_BALANCE_CR) ELSE 0 END
    YTD Budget :
    CASE WHEN .GL_BALANCES.ACTUAL_FLAG = 'B' THEN GL_BALANCES.PERIOD_NET_DR - .GL_BALANCES.PERIOD_NET_CR + (.GL_BALANCES.BEGIN_BALANCE_DR - GL_BALANCES.BEGIN_BALANCE_CR) ELSE 0 END
    Current Month actual :
    TODATE(GL_BALANCES."YTD Actual", "Time Dim"."Month")
    Current Month Budget :
    TODATE(GL_BALANCES."YTD Budget", "Time Dim"."Month")
    Please let me know, if my calculations are right.
    Thanks

    Hi,
    I have only one KF and after closing the month, I would load actuals to the Budget KF itself.
    Right now this coulmn is a formula with below:
    ( 1 <= 'Last Actual' ) * 'Jan / Actual' + ( 1 > 'Last Actual' ) * 'Jan / &0T_VERS&'
    And the column heading is "January Act/Budget"
    At the moment it is confusing for users to know which figures are Actuals and which are Budget.
    Thanks
    Priya

  • 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.

  • "On time pick rate" logical column defined as INT instead of DOUBLE

    Hi,
    I noticed that there is a problem with the indicator "Top 10 Plants by Pick Rate". The calculation of this formula results in a decimal number indicating the number of selections made in time in relation to the total number of selections. However, in the "Business Model and Mapping" in "Oracle BI Administration Tool", the Logical Column "On time pick rate" (Core.Fact - Sales - Pick Line) is defined as INT (integer). This produces a truncation of the information and the indicator always displays 0 (zero).
    You think this is a bug or is the expected behavior?
    Regards

    I have the same problem also. I'm using VC++6.0 and ADO 2.71 to perform queries with an Oracle Client 9.2.0.1. The same query on same table but on different Server version returns different results. With the production server, which is an 8.1.7.4 server, a NUMBER column returns a LONG value, while on the Test server, which is a 9.2.0.5.0 server, the same column returns a DOUBLE value. The problem is that using ADO I don't check data type/size when getting values, but I aspect a LONG value because a created the column with NUMBER specification. Could this be a different default from previous server version when creating the NUMBER column without any SCALE and PRECISION attributes?

  • Incorrect workbook results using pre-calculation server

    Hi,
    I encounter problem running BW 3.5 workbook (Excel 2007) using pre-calculation server.  The results show incomplete data, mostly of the time missing characteristic values.  However, it works for one of the report.
    Appreciate sharing of experiences. Thanks.
    Regards,
    Chen

    Hi,
    Thanks for the suggestions.  I have tested with new workbooks inserted with new queries, and those are running OK manually. The workbook does not exceed 65k rows or 255 columns.
    I discovered one of the workbook showing correct results except for calculation using function %A, so I suspect there is missing setting in Excel 2007 that has caused the macro not working properly.
    Anything to share ?
    Regards,
    Chen

Maybe you are looking for

  • Production Order in PP/PS Integration Project

    Hi, In out project, requirement is generated with respect to a Project (WBS Element). I ran MRP, planned orders are generated and converted to Production ORders with respect to WBS Element. I have created the workcenters created using CR01 transactio

  • Data pump: by using dbms_datapump

    I wrote a pl/sql procedure that compiles and there is no error. But when I execute the procedure, I got follwing error ERROR at line 1: ORA-31623: a job is not attached to this session via the specified handle ORA-06512: at "SYS.DBMS_SYS_ERROR", line

  • Add users to databases in Availability Groups

    Hello, I created a database. On instance level I selected Security | Logins and added some users. I granted the users a number of roles on the database I created. I added the database to an Availability group. Now two replicas of the database are on

  • N97 Ovi Contacts problem...

    Hi No one receives my Ovi Contacts Invitations made in my N97... I add friends, send the invitation but it never arrives... Does anyone experienced the same issue?

  • Why does photo stream duplicate photos on iOS?

    Until Yosemite comes out it seems that we're kind of stuck trying to figure out an "easy" way to have photos display on multiple devices. I've just started messing with iCloud & the photos and when I turn on photo stream it duplicates them into it's