Logical Columns - Running Sum & 3Month Rollover

Hi All,
Need to build a logical column.
I have a column with number of units (count distinct) in RPD.
I need to build a new logical column in the REPOSITORY , such that it has running sum values.... sothat when i pick this #units column and months column in the ANSWERS...I need to get roll over of all previous values for first month.
Say Jan ---> XXXX units ( summation of all previous available units - few years)
Feb----> YYYY units ( sum of till jan values & Feb units)
Mar----> ZZZZ ...etc ( sum of till Feb values & Mar units) so on.
Based on this newly built column I need to build another column of " 3 months roll over " column.
Replies appreciated.
Thanks in advance.

Hi user11939829m
So help me understand your new measures a little better. For the sake of this post, let's say your data is like so
Month Year -- Units
Jan 2010 -- 1
Feb 2010 -- 2
Mar 2010 -- 3
Apr 2010 -- 4
May 2010 -- 5
Jun 2010 -- 6Then let's say you have a report with the above columns and the new running sum columns.
Month Year -- Units -- Running Sum Units
Jan 2010 -- 1 -- 1
Feb 2010 -- 2 -- 3
Mar 2010 -- 3 -- 6
Apr 2010 -- 4 -- 10
May 2010 -- 5 -- 15
Jun 2010 -- 6 -- 21Now what exactly would your three months rollover be? Would the 3 month rolling sum = running sum for current month + running sum for last month + running sum for last last month?
i.e.
Month Year -- Units -- Running Sum Units -- 3 Month Rolling Sum
Jan 2010 -- 1 -- 1 -- 1
Feb 2010 -- 2 -- 3 -- 4
Mar 2010 -- 3 -- 6 -- 10
Apr 2010 -- 4 -- 10 -- 19
May 2010 -- 5 -- 15 -- 31
Jun 2010 -- 6 -- 21 -- 46Not sure what value such a measure would add. Or do you mean 3 month rolling sum would be the running sum for just the last three months (like below)? This makes more sense but in your description, you indicated that you'd build the 3 month rolling sum off of the running sum which confused me a bit.
Month Year -- Units -- Running Sum Units -- 3 Month Rolling Sum
Jan 2010 -- 1 -- 1 -- 1
Feb 2010 -- 2 -- 3 -- 3
Mar 2010 -- 3 -- 6 -- 6
Apr 2010 -- 4 -- 10 -- 9
May 2010 -- 5 -- 15 -- 12
Jun 2010 -- 6 -- 21 -- 15 Is that what you are going for? Please elaborate.
Best regards,
-Joe

Similar Messages

  • Logical column for sum number of occurences

    Hi,
    In Discoverer I have a column: "Number of Employees" and it is the expression like this: DECODE(Polisaid,Polisaid,1). I tried the same in OBI repository: CASE WHEN "Number of Employees" IS NOT NULL THEN 1 END. In query, How much employees are in HR Department The OBI gave me only number 1?? (I cannot use Aggregate function) while for the same query Discoverer gave me correct answer.
    How to solve the problem?
    Thanks in advance.

    Hi stanisa,
    DECODE(Polisaid,Polisaid,1)here decodeand case are same...he meant column equals polisaid then give me polisaid if not display 1.
    Case when "Number of Employees" is not null then "Number of Employees" else 1 end;
    Hope it helps you.
    By,
    KK

  • Running sum per column in pivot table

    Hello,
    I am facing a problem with a running sum in a pivot table. As you know, the running sum provided by OBIEE spans across rows and columns. My requirements force me to have a running sum per each column (I have four columns, one for each quarter of the year). My pivot is as follows:
    ------------------------------|| 1st Quarter / 2nd Quarter ...
    type of product / status || (Measure / Running Sum) / (Measure / Running Sum) ...
    I've tried using the evaluate function with a "sum over" but that doesn't seem to work either.
    Do you have any ideas that could be useful to solve this?
    Thank you in advance for your time,
    João Marques

    Do not use the "running measure" button in pivot table, but try this :
    edit the formula of your measure and type :
    RSUM(mesure by dimension)
    where dimension is the attribute dimension that you put on the ROWS of your pivot table
    Exemple : I've got the criteria REVENUE, YEAR, CUSTOMER TYPE
    I put the YEAR in the Columns of the pivot table
    I put the CUSTOMER TYPE on the rows of the pivot table
    I put the REVENUE in the measures of the pivot table
    Measure has the formula : RSUM("Facts Revenue".Revenue BY Customers."Customer Type")

  • Running Sum on column total minus current month

    Hi all,
    Is it possible to get the running sum total value of all the months minus the current month value in the column function,as I need to display the same in the narrative view.
    Like RSUM(YTD(M-1)Value)...
    Presently this RSUM is not giving me the right value.
    I can also do the total for all the months minus the current month value.Can it be done at the column funtion?
    Regards
    Ashish

    Hi
    Can you elaborate a little..Did you mean I need to create one variable in the repository?
    YTD (M-1 Value) / (YTD Last Year M 0 Value)
    where M0 is current month and M-1 is previous month and value is a measure.
    Regards
    Ashish
    Edited by: Ashish21473 on Jan 7, 2011 3:38 AM

  • How to change the variable value at run time in logical column in RPD

    for e.g..
    i have used a session variable in logical column in rpd in case statement. now in dashboard prompt i am using that variable to store data which user is passing but the data captured is not getting reflected in the logical column.
    its been always populated with the default value passed through the initilization block..

    resolved myself

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

  • Why logical column in terms of other logical columns and not physical sourc

    Hello
    Can someone shed some light that in what scenario ..defining a logical column in terms of other logical column is beneficial compared to defining logical column in terms of physical sources?
    I found something on google that said defining in terms of logical columns is like one time thing. I dont understand, even if you define in terms of physical source that' too one time.
    In both the case we build an expression specifying which logical or physical columns.
    Thank you

    well logical columns from physical source, if in logical fact table you can set aggr rules. Logical columns based on other logical columns you can not. Logical columns based on other logical columns will inherit the aggr rules. So for instance, if you create col1 and col2. Both based off physical and both having sum aggr rule. If you create logical column col3 based off these two as such "col1"/"col2" it will produce the following sum(col1)/cum(col2). Now if you really wanted sum(col1/col2) then you should have made col3 based off physical as col1/col2 with aggr rule of sum.
    Also of some note, all logical columns based off physical will be performed in the inner most query. So for my example above to get col3 where it is logical col1/logical col2 or sum(col1)/sum(col2) the physical query will be:
    select D1.c1/D1.c2
    from (
    select sum(col1) as c1,
    sum(col2) as c2
    from tableA
    ) D1
    So my short summary of this, is what or how do you want your sql to be created. Based on this can you lead you to your answer of whether to use logical col based on physical or other logical columns. And unltimately, check the sql generated from your work to ensure the sql queries generated are what you want and expect.
    I hope this helps!

  • How To Create Logical column For Lastyear To Till Date

    Hi All,
    I Have to calculate Lastyear to Till Date for Logical Column.
    Ex:I have Time Dime and Fact column and Dimension columns.
    jan 2011 to oct 2012.
    Please Let me know.
    Thanks,
    Abhi

    Looks like you are not reading my messages
    Since you are doing on logical columns getting this error.
    Try this using physical columns then count from aggregate tab
    CASE WHEN "Oracle Data Warehouse"."Catalog"."dbo"."Fact_W_SRVREQ_F_Open_Date"."OPEN_DT_WID" > 20110101 THEN "Oracle Data Warehouse"."Catalog"."dbo"."Fact_W_SRVREQ_F_Open_Date"."SR_WID" END
    The same you can go with your variable
    Or else the same can do by duplicating the existing Fact - CRM - Service Request"."# of SRs" and just add above code.
    or just use the below you dont use sum since already aggregation is happend for # of SRs
    CASE WHEN "Core"."Dim - Date"."Year" = VALUEOf("Warehouse Refresh Date Last Year"."CURRENT_CALENDAR_YEAR_LAST_YEAR") AND "Core"."Dim - Date"."Date" < VALUEOF("Warehouse Refresh Date Last Year"."LAST_REFRESH_DATE_LAST_YEAR") THEN "Core"."Fact - CRM - Service Request"."# of SRs" END
    Hope this works, mark as correct

  • Logical column levels and aggregation

    Hi all,
    In order to have reliable results, I had to specify a dimension level in a logical column properties.
    As a consequence, the generated query includes this level in the query (that's great), but no aggregation is performed afterwards. Therefore, when I display this measure alone in a flat table or a ticker, I have a set of detailed value instead of an aggregated value. The only place where I can see my aggregated value is in a pivot table.
    In answers, I tried to :
    - replace the default aggregation by an explicit SUM, or
    - add a SUM() in the measure formula
    but neither solved the issue.
    Does anyone know how to solve it?
    Thanks in advance.
    Ced.

    Hi,
    What is the source for AGO measures PriorDollars and PriorUnits?
    AGO(CurrentUnits, '?',?)
    AGO(CurrentDollars, '?',?)
    Have you set up hierarchy correctly (because you said that the granularity in your fact table is at week grain) and it should be like this:
    Fiscal Year > Fiscal Quarter > Fiscal Month > Fiscal Week
    It depends on how did you define your TIME dimension.
    Try maybe like this:
    PriorYEARDollars = AGO(CurrentUnits, 'YEAR',1)
    and the same for
    PriorYEARUnits =AGO(CurrentDollars, 'YEAR',1)
    Now, if you put in the report
    YEAR
    CurrentUnits
    CurrentDollars
    PriorYEARUnits
    PriorYEARDollars
    you'll get only three rows (for 3 years) with PRIOR YEAR measures.
    Try it.
    A good reference for understanding AGO:
    http://obiee101.blogspot.com/2008/11/obiee-ago-and-todate-series.html
    Also you need to set chronological key correctly for TIME dimension.
    Regards
    Goran
    http://108obiee.blogspot.com

  • 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

  • Get Last value in logical column or answer OBIEE

    Hi Gurus,
    I have detail report like this
    YEAR  GRADE_ID    Group    Value      Desired Value
    2013    D                     1         9000      100000
                                      1         9000       100000
                                      1         9000       100000
                                      2         1000        100000
                                      2         1000          100000
                                      2         1000          100000
    I want to sum the lastest value from group 1 and group 2, how to do this in Logical column in repository or in dashboard or perhaps in PL SQL?
    Please help
    Regards
    JOE

    Let me explain further:
    >>Desired report:
                          Level
    Item                 D
    Jan-Mar            9.000
    Apr-Dec            1.000
    -----------------------------------------+
    Annual Year       10.000
    >>Detail:
    Year     Grade      Month        Group        AVG Value    Desired Value
    2013    D          Jan                    1               9.000          10.0000
                            Feb                  1                9.000          10.0000
                            Mar                  1                9.000          10.0000
                            Apr                  2                1.000          10.0000
                            May                 2                1.000          10.0000
                            Dec                 2                1.000           10.0000
    Note:
    The datas per year divided in two section group 1 (Jan-Mar), group 2(Apr-Dec).
    But If the current month is FEB then the latest avg value is 9000 then desired value also 9000,
    If the current month is JUN then Desired value =  the latest avg value of MAR + the latest avg value of JUN
    I really appreciate your help
    Thanks
    JOE

  • Two physical logical source formulas for on logical column

    I have two fact tables :
    1. W_SERVICE_REQ_F(opened_dt_wid, assigned_dt_wid, closed_dt_wid, QUEUE_WID, SERVICE_REQ_WID): grain is one row per service request
    2. W_SERVICE_REQ_DAY_A(DATE_WID, QUEUE_WID, NUM_OPENED, NUM_CLOSED, num_assigned)
    The goal is to answer NUM_OPENED, NUM_CLOSED per queue in a day and be able to drill-down to those service requests.
    Physical model:
    Common_Date.row_wid = W_SERVICE_REQ_F (Opened_Dt).opened_dt_wid
    Common_Date.row_wid = W_SERVICE_REQ_F (Closed_Dt).closed_dt_wid
    Common_Date.row_wid = W_SERVICE_REQ_DAY_A.DATE_WID
    Queue_d.row_wid = W_SERVICE_REQ_F.QUEUE_WID
    Queue._drow_wid = W_SERVICE_REQ_DAY_A.QUEUE_WID
    Service_req_d.row_wid = W_SERVICE_REQ_F.SERVICE_REQ_WID. (there is no join between Queue_d and Service_req_d)
    BMM Fact and LTSs:
    I have W_SERVICE_REQ_DAY_A, W_SERVICE_REQ_F (Opened_Dt), W_SERVICE_REQ_F (Closed_Dt) as LTSs of "Fact - Service Request" in that order.
    BMM Fact logical columns (measures):
    # Closed
    # Opened
    Question:
    I want to configure each of the above logical column with two physical columns of different aggregate forumlas. (to ensure queries that dont need service req number hit a table) (similar to http://www.gerardnico.com/wiki/dat/obiee/fragmentationlevel_based).
    SUM(W_SERVICE_REQ_DAY_A.NUM_CLOSED)
    COUNT("W_SERVICE_REQ_F (Closed_Dt)".SERVICE_REQ_WID)
    Can someone help in configuring one logical column with two physical column sources with different aggregate formulas?
    This is what I tried:
    In # Opened Properites->Data Type, mapped it to both W_SERVICE_REQ_F (Closed_Dt).ROW_WID and W_SERVICE_REQ_DAY_A.NUM_CLOSED
    In # Opened Properties->Aggregation tab, selected 'Default aggregation rule' as Count Distinct. In the bottom, Logical table sources override as follows:
    W_SERVICE_REQ_DAY_A : SUM("Fact - Service Request"."# Closed")
    W_SERVICE_REQ_F : COUNT("Fact - Service Request"."# Closed")
    Should it be done in a different way?
    PS: OBIEE 10.1.3.4.
    added OBIEE version: Feb 3, 2012 4:40 PM

    I have two fact tables :
    1. W_SERVICE_REQ_F(opened_dt_wid, assigned_dt_wid, closed_dt_wid, QUEUE_WID, SERVICE_REQ_WID): grain is one row per service request
    2. W_SERVICE_REQ_DAY_A(DATE_WID, QUEUE_WID, NUM_OPENED, NUM_CLOSED, num_assigned)
    The goal is to answer NUM_OPENED, NUM_CLOSED per queue in a day and be able to drill-down to those service requests.
    Physical model:
    Common_Date.row_wid = W_SERVICE_REQ_F (Opened_Dt).opened_dt_wid
    Common_Date.row_wid = W_SERVICE_REQ_F (Closed_Dt).closed_dt_wid
    Common_Date.row_wid = W_SERVICE_REQ_DAY_A.DATE_WID
    Queue_d.row_wid = W_SERVICE_REQ_F.QUEUE_WID
    Queue._drow_wid = W_SERVICE_REQ_DAY_A.QUEUE_WID
    Service_req_d.row_wid = W_SERVICE_REQ_F.SERVICE_REQ_WID. (there is no join between Queue_d and Service_req_d)
    BMM Fact and LTSs:
    I have W_SERVICE_REQ_DAY_A, W_SERVICE_REQ_F (Opened_Dt), W_SERVICE_REQ_F (Closed_Dt) as LTSs of "Fact - Service Request" in that order.
    BMM Fact logical columns (measures):
    # Closed
    # Opened
    Question:
    I want to configure each of the above logical column with two physical columns of different aggregate forumlas. (to ensure queries that dont need service req number hit a table) (similar to http://www.gerardnico.com/wiki/dat/obiee/fragmentationlevel_based).
    SUM(W_SERVICE_REQ_DAY_A.NUM_CLOSED)
    COUNT("W_SERVICE_REQ_F (Closed_Dt)".SERVICE_REQ_WID)
    Can someone help in configuring one logical column with two physical column sources with different aggregate formulas?
    This is what I tried:
    In # Opened Properites->Data Type, mapped it to both W_SERVICE_REQ_F (Closed_Dt).ROW_WID and W_SERVICE_REQ_DAY_A.NUM_CLOSED
    In # Opened Properties->Aggregation tab, selected 'Default aggregation rule' as Count Distinct. In the bottom, Logical table sources override as follows:
    W_SERVICE_REQ_DAY_A : SUM("Fact - Service Request"."# Closed")
    W_SERVICE_REQ_F : COUNT("Fact - Service Request"."# Closed")
    Should it be done in a different way?
    PS: OBIEE 10.1.3.4.
    added OBIEE version: Feb 3, 2012 4:40 PM

  • Logical Column Aggregation

    I have CurrentDollars and CurrentUnits in my measures table, and I"ve created PriorDollars and PriorUnits logical columns utilizing the AGO function. Since 'Use existing logical columns as the source' is checked, I don't have access to the Aggregation tab, and everything I've read leads me to believe that this is OBIEE's way of forcing inheritance of the aggregation rule of the 'source' column.
    Problem is, the Prior* columns don't aggregate (sum). If I create a report with Year, CurrentDollars, CurrentUnits, I get three rows... one row for each year that has data. That's what I want. But when I add either of the Prior columns, I get 52 rows per year (since my data is at the week level). If I wrap either of the Prior columns in SUM, it sums all Prior* column values. If I check the box that says I want it to use Sum aggregation, nothing changes. I get similar bogus results if I add a SUM function around the original AGO function.
    This is a real drag. Am I missing something obvious? Some blogs lead me to think that this is a known bug. Does anyone have a workaround?
    Edited by: Tom G. on Aug 26, 2009 11:30 AM

    Hi,
    What is the source for AGO measures PriorDollars and PriorUnits?
    AGO(CurrentUnits, '?',?)
    AGO(CurrentDollars, '?',?)
    Have you set up hierarchy correctly (because you said that the granularity in your fact table is at week grain) and it should be like this:
    Fiscal Year > Fiscal Quarter > Fiscal Month > Fiscal Week
    It depends on how did you define your TIME dimension.
    Try maybe like this:
    PriorYEARDollars = AGO(CurrentUnits, 'YEAR',1)
    and the same for
    PriorYEARUnits =AGO(CurrentDollars, 'YEAR',1)
    Now, if you put in the report
    YEAR
    CurrentUnits
    CurrentDollars
    PriorYEARUnits
    PriorYEARDollars
    you'll get only three rows (for 3 years) with PRIOR YEAR measures.
    Try it.
    A good reference for understanding AGO:
    http://obiee101.blogspot.com/2008/11/obiee-ago-and-todate-series.html
    Also you need to set chronological key correctly for TIME dimension.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Aggregation tab disabled for fx logical columns

    Hello, I am new to OBIEE. Can somebody please help me understand the folowing -
    Query - While defining formula column in BMM whenver we use logical column as source why Aggregation Rule tab gets disable?
    How can i apply aggregation rule for such columns at RPD. These columns are recognised by icon fx.
    Please find attached screenshot to help understand my question.
    [https://picasaweb.google.com/105903262683032369187/OBIEE?authkey=Gv1sRgCPW2qu2x8eKdjgE]
    Any help is greatly appreciated.
    Thanks
    Edited by: 930542 on Jun 22, 2012 10:03 PM

    Click on LTS of Table - Column Mapping - Select the logical column - click on expression - Put your logic here. You will get Aggregation rule is enalbed for the column.
    Why ? -- Reason could be nested aggregation is not allowed. Aggregation on the normal column applied during query generation at run time. If you use that Agg.Measure to derive another Agg.measure server could not recognize it during runtime.

  • 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

  • Trying to import fotos from a nas drive into iphoto

    OK folks. Seems that I'm taking the long road instead of the short but here it is .... I have a mac mini with a SSD drive on which I store the OS in one partition and user data in another.  No problem. I also have a non-partitioned Time Capsule that

  • How to rip lossless high res audio from VIDEO_TS folder (DVD)?

    Freeware would be nice but I'll pay if I have to. I want to rip the audio from a DVD Video disc (not a DVD Audio disc - already got that covered). Let me be clear here so as to avoid all the lossy suggestions. I need to rip the full resolution audio

  • ArchiveLink - MRKO - Consignment and Pipeline Settlement

    Hi All, how can I configure ArchiveLink to be able to insert bar code when I settle an invoice? I'm refering to transaction OAC5. Is it possible or is it a background process when MRKO creates the FI document? Many thanks. Luca

  • Alt Text and images

    Can anyone point me in the direction to force users to use alt text with images in Portal content areas to meet with W3C compliency?

  • Trouble parsing DTD

    I'm trying to parse a DTD with Java using the code below. Using the XMLParser the parsing works fine, but when I try to use the DOMParser nothing works, I end up with the errors like "XML-0230: (Error) Illegal change of encoding: from UCS-2 to Unicod