Using Previous function in summary rows?

Hi,
I have a requirment, where I have to use the value got in previous column in the summary row.
The scenario is as follows.
There are Product, Quantity on Hand , Order Type and Date column. I am using cross tab, As I have to use the details of columns for each date.
So date will be spreaded across table as there are more dates.
In summary column, I would like to do a calcuation for each date. And I should use the calculated amount on one date in the next date and the calcuation continues.
I am trying to use previous function, but its showing computation error.
I am attaching a excel sheet with a sample example for easy understanding.
The calculation which I used in summary row is avialble in formula section, when we select the column.
Thanks in Advance.
Regards
Gowtham

Hi BOCP,
Yes, I am trying to use this function in Summary after Break.
Sorry, I missed out attachment. And I didn't find a way to attach it.
Suresh,
I didn't find last() function in WebI Editor. I am using BO XI R2.
Thanks a lot.
Regards,
Gowtham Sen.

Similar Messages

  • Unable to apply report filter by using Previous Function

    Hello,
    I am new to Webi and need your expertise.  I created a varible using Previous Function.  The varible works fine when you view it.  However, it doesn't work when I tried to apply this varible in the report filter. 
    Here are the varibles:
    Varible A = Previous([Field A]; ([Field B]; [Field C]))
    DisplayVarible = If([Varible A] = 'Letter A'; 1; 0)
    I learned that when applying Display Varible in the report filtes, the Value(s) from list is grayed out.  How do I fix this?
    Thank you.

    The objective is to find the turnaround time from one customer to the next customer.  For example, you have a hair saloon shop and you want to know how long does it take when you finish one customer and start the next customer.
    Customer  PreviousTimeEnd       Time Begin            Time End            Time Diff(Time Begin - Previous Time End)
    A                                 7:00                    7:30                                                                     
    B               7:30              7:45                    8:30                15
    C               8:30              9:00                    9:30                30
    D               9:30              9:45                   10:00                15
    As you can see, I can calculate the minutes difference.  However, I cannot apply time difference varible in the report filter.  I hope I have provided you enough info.  Thank you for your help.

  • SSRS Get value of previous row in a matrix (cannot use previous function because it's a matrix)

    I have a SSRS report which uses a matrix for a crosstab effect.
    Each row contains about 10 score values in 10 columns respectively. I need each row to check against the previous row, and i need each score value in each column to be compared to the corresponding column score value in the previous row. 
    If the current score is greater than the corresponding previous score (in the previous row), then i want to change the background of the cell.
    if the current score is smaller than the previous, then it's a different color.
    if they are equal, or it's the first row in the matrix table, then leave white.
    I have found custom code functions to use in the SSRS expression fields, but every single one of them compares against the previous COLUMN value and not the previous ROW value which is what i need. the "Previous" function would be perfect if i
    could use it in a matrix but i can't. (i keep getting error "The use of a Previous aggregate function in a tablix cell is not supported"). looking around it turns out that matrices are arrange in groups and not in rows which is why Previous can't
    be used and the only way is with custom code.
    Please help. if you have any custom code samples that achieve what i need, please share, or give me advice on how to achieve this. 
    Thank you

    I figured it out. Maybe it can help someone else in the future:
    Public Shared count as Integer = 0
    Public Shared currentRow As Integer = 1
    Public Shared MatrixStructures As New System.Collections.Generic.List(Of MatrixStructure)()
    Public Shared Function GetCellColor(row as Integer, score as Integer)
    If (row > currentRow) Then
    count = 0
    currentRow = row
    End If
    count = count + 1
    Dim matrixStructure As New MatrixStructure()
    matrixStructure.RowIndex = row
    matrixStructure.ColumnIndex = count
    matrixStructure.ScoreValue = score
    MatrixStructures.Add(matrixStructure)
    If score = 0 Then
    Return "White"
    End If
    Dim val As MatrixStructure = MatrixStructures.Find(Function(s As MatrixStructure)
    Return s.GetRowIndex() = row - 1 AndAlso s.GetColumnIndex() = count
    End Function)
    If (Not (val Is Nothing)) Then
    If val.scoreValue = 0 Then
    Return "White"
    End If
    If score >= val.scoreValue + 2 Then
    Return "Green"
    ElseIf score <= val.scoreValue - 2 Then
    Return "Red"
    End If
    End If
    Return "White"
    End Function
    Public Class MatrixStructure
    Public rowIndex As Integer
    Property GetRowIndex() As Integer
    Get
    Return rowIndex
    End Get
    Set(ByVal Value As Integer)
    rowIndex = Value
    End Set
    End Property
    Public columnIndex As Integer
    Property GetColumnIndex() As Integer
    Get
    Return columnIndex
    End Get
    Set(ByVal Value As Integer)
    columnIndex = Value
    End Set
    End Property
    Public scoreValue As Integer
    Property GetScoreValue () As Integer
    Get
    Return scoreValue
    End Get
    Set(ByVal Value As Integer)
    scoreValue = Value
    End Set
    End Property
    End Class
    and to pass the current row number from the expression i use this
    Ceiling(RowNumber(NOTHING) / 10)
    i divide the row number by 10 because there are ten columns. if you don't know the number of columns, or it's a variable number, then return it from the stored procedure query in the first place. that's what I had to do

  • Can I use Concatenate function for multiple rows?

    I have a lead list that contains 5000 leads. The format of this list contains address data that is saved in separate columns (ie: address, address 2, city, state, zip). I need this data in 1 column. I tried to use the concatenate function to combine the data for 1 row and it worked perfectly. I tried to do this for multiple rows and the function is greyed out. Is there a work around or way that I can combine this data for all 5000 rows without doing it 1 by one?

    Look at this table;
    In B9, the formula is;
    =B2&" "&C2&" "&D2&" "&E2&" "&B3&" "&C3&" "&D3&" "&E3
    Yvan KOENIG (VALLAURIS, France) dimanche 18 octobre 2009 20:51:47

  • SSRS 2008R2 : Not able to use Previous aggregrate function in matrix columns cell

    Hi Expert,
    I have used a matrix tablix in my report. It is working fine. But when I am trying to use Previous aggregrate in one matrix column cell I get the below error:
    The use of previous aggregrate function ia a tablix cell with in 'Tablix1' is not supported.
    Please help me regarding that.
    Thanks Rana

    Hi Rana,
    In your scenario, you use previous function in the “Data” cell, right? Previous function cannot be used in the overlapping parts of row group and column group. One workaround of this issue is use custom code to get the previous value.
    Public Shared previous as Integer
    Public Shared current as Integer
      Public Shared Function GetCurrent(Item as Integer) as Integer
         previous=current
         current=Item
         return current
      End Function
      Public Shared Function GetPrevious()
         return previous
      End Function
    Then you can use the expression below in the “Data” cell to get the previous value:
    =Code.GetCurrent(fields!Score.Value) & "-Previous-" & iif(Code.GetPrevious()=0,"",Code.GetPrevious())
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Spell function using previous word.

    The Spelling and Grammar,^-click, function that I use many times each day has lost it's (tiny little mind). Under Leopard 10.5 it does not search the current window at all. It replaces the current cursor location with the last correction, from a previous document or web location.

    Hi BOCP,
    Yes, I am trying to use this function in Summary after Break.
    Sorry, I missed out attachment. And I didn't find a way to attach it.
    Suresh,
    I didn't find last() function in WebI Editor. I am using BO XI R2.
    Thanks a lot.
    Regards,
    Gowtham Sen.

  • Previous function is  working fine. But Relative value function is not working?

    HI Experts,
    I have used previous function based on calender year it is working fine. but when i have used Relative function based on calender year. It is not working fine. Here I have attached screen shot. Please find the attachment.
    Previous Function.
    Relative value Function:

    OK, I added a NEW password to my account settings and everything is fine. **** computers.

  • Multivalue error when using the previous() function

    I am getting a multivalue error when using the previous() function on a dimension object in the report.  I thought that the previous function was supposed to look at the current report and then look at the previous record's contents.  How could this possibly give me a multivalue error when the value is clearly output in the previous row?  Anyone have any ideas?
    By the way, this is a valuable function for the types of reports that I design.  The next() function would be even more valuable.
    Thanks for your help.

    Hi Michael,
    Could you please test the following solutions it might help you to resolve the issue.
    Solution1:
    Use slice and dice to reset all the tables that have #multivalue in it. The only problem with this workaround is they have to do the formatting manually.
    Solution2:
    Also, test the issue by changing the object to dimension if it is a measure or to measure if it is a dimension.
    Regards,
    Sarbhjeet Kaur

  • Calculate using previous column and rows

    Hello TNO members,
    I have a complicated problem I need to solve, how ever I am missing knowledge about calculating using previous rows and columns in current select.
    Test data
    with t as (
      select 1 as box, 1 as box_group, 10 as max_qty from dual union all
      select 2, 1, 15 from dual union all
      select 3, 1, 40 from dual union all
      select 4, 1, 45 from dual union all
      select 5, 2, 15 from dual union all
      select 6, 2, 20 from dual union all
      select 7, 2, 20 from dual union all
      select 8, 3, 20 from dual)Expected Output result
    box box_group max_qty assigned_from_60
    1   1         10      10  
    2   1         15      15
    3   1         40      17
    4   1         45      18
    5   2         15      0
    6   2         20      0
    7   2         20      0
    8   3         20      0The problem:
    In total 60 items are shared among the boxes in the same group, ordered by the lowest max_qty.
    10 items can be assign to each box in group 1. (Used items: 40)
    The remaining 20 items will be assigned to the other boxes in group 1.
    5 more items can be assign to each box in group 1 (Used items: 15)
    The remaining 15 items will be assigned to the remaining boxes in group 1.
    2 more items can be assign to each box in group 1 (used items: 4)
    One item remains. When items cannot be shared equally among the remaining boxes, ordered by the highest max_quantity, assign +1 till no item remains.
    My solution in steps:
    1. Calculate max_qty difference. How can I calculate the difference between the max_qty from box 1 and 2? Tricky is not to calculate the difference between different groups.
    This means output result should be something like
    box box_group max_qty qty_dif
    1   1         10      10  
    2   1         15      5
    3   1         40      25
    4   1         45      5
    5   2         15      15
    6   2         20      5
    7   2         20      0
    8   3         20      202. Remaining boxes in the same group. I want to know how many boxes are in the same group. Especially the remaining boxes when the current max_quantity is filled.
    Using the following code does not result in the correct output, what is wrong or missing here?
    count(*) over(partition by box_group order by max_qty asc range between current row and unbounded following) This means output result should be something like
    box box_group max_qty qty_dif rem_boxes
    1   1         10      10      4  
    2   1         15      5       3
    3   1         40      25      2
    4   1         45      5       1
    5   2         15      15      3
    6   2         20      5       2
    7   2         20      0       1
    8   3         20      20      13. Calculate costs. This one is faily easy rem_boxes * qty_dif (*per row*)
    This means output result should be something like
    box box_group max_qty qty_dif rem_boxes cost
    1   1         10      10      4         40
    2   1         15      5       3         15
    3   1         40      25      2         50
    4   1         45      5       1         5
    5   2         15      15      3         45
    6   2         20      5       2         10
    7   2         20      0       1         0
    8   3         20      20      1         204. Calculate rem_items. 60 - (rem_boxes * qty_dif of box 1) - (rem_boxes * qty_dif of box 2) - (rem_boxes * qty_dif
    of box n). How can I calculate using results of previous rows? (*all, not per group*)
    This means output result should be something like
    box box_group max_qty qty_dif rem_boxes cost rem_items
    1   1         10      10      4         40   20
    2   1         15      5       3         15   5
    3   1         40      25      2         50   -45
    4   1         45      5       1         5    -50
    5   2         15      15      3         45   -95
    6   2         20      5       2         10   -105
    7   2         20      0       1         0    -105
    8   3         20      20      1         20   -1255. Assign full quantity. For each row check if rem_items > 0 then 1 else 0
    This means output result should be something like
    box box_group max_qty qty_dif rem_boxes cost rem_items assign
    1   1         10      10      4         40   20        1
    2   1         15      5       3         15   5         1
    3   1         40      25      2         50   -45       0
    4   1         45      5       1         5    -50       0
    5   2         15      15      3         45   -95       0
    6   2         20      5       2         10   -105      0
    7   2         20      0       1         0    -105      0
    8   3         20      20      1         20   -125      06. Calculate assign quantity attemp 1. Calculate assign quantity of remaining boxes per group
    When assign = 1 then max_qty else pervious a_qty (*within same group*)
    This means output result should be something like
    box box_group max_qty qty_dif rem_boxes cost rem_items assign a_qty
    1   1         10      10      4         40   20        1       10
    2   1         15      5       3         15   5         1       15
    3   1         40      25      2         50   -45       0       15
    4   1         45      5       1         5    -50       0       15
    5   2         15      15      3         45   -95       0       0
    6   2         20      5       2         10   -105      0       0
    7   2         20      0       1         0    -105      0       0
    8   3         20      20      1         20   -125      0       0How to solve the rest, I do not know yet. Any other suggestion to solve this problem, is welcome.
    Since I'm not really a professional this is what I tried till now
    with z as (
      select 1 as box, 1 as box_group, 10 as max_qty from dual union all
      select 2, 1, 15 from dual union all
      select 3, 1, 40 from dual union all
      select 4, 1, 45 from dual union all
      select 5, 2, 15 from dual union all
      select 6, 2, 20 from dual union all
      select 7, 2, 20 from dual union all
      select 8, 3, 20 from dual)
    select u.*,
           case
             when u.assign = 2 then u.max_qty
             when u.assign = 1 then 0
             when u.assign = 0 then 0
           end as assigned_qty
    from
        select v.*,
               case
                 when 60 - sum(v.max_qty) over (order by v.box_group, v.max_qty, v.box) >= 0
                   and v.rem_items_before >= 0 then 2
                 when 60 - sum(v.max_qty) over (order by v.box_group, v.max_qty, v.box) < 0
                   and v.rem_items_before > 0 then 1 else 0
               end as assign
        from
            select w.*,
                   w.rem_items_after + w.max_qty as rem_items_before
            from
                select x.*,
                       60 - x.qty_assigned as rem_items_after
                from  
                    select y.*,
                           y.max_qty * y.rem_boxes as total_cost,
                           sum(y.max_qty) over (order by y.box_group, y.max_qty, y.box) as qty_assigned
                    from 
                        select z.*,
                               count(*) over (partition by z.box_group order by z.max_qty, z.box asc range between current row and unbounded following) as rem_boxes
                        from z
                      ) y
                  ) x
              ) w
          ) v
      ) uKind regards,
    Metro
    Edited by: 858378 on 30-mei-2011 4:39
    Edited by: 858378 on 30-mei-2011 5:05

    Hi, Metro,
    858378 wrote:
    Hello, thanks for your help so far.
    The course I am in, teaches you how to use the basic pl sql language such are selecting from tables.Is it about PL/SQL or SQL?
    I have learned things about
    - SELECT
    - FROM
    - WHERE
    - GROUP BY
    - ORDER BY
    - SUB SELECTION IN SELECT
    - SUB SELECTION IN FROM
    - SUM, COUNT, MIN, MAX
    - CASES
    - INNER, OUTER, LEFT, FULL, CROSS JOINSAll of these are parts of the SQL language, not PL/SQL.
    We are now at partitioning.Are you specifically at partitioning, or iare you at a point where the book talks about analytic functions, which sometimes, but not always, have a PARTTION BY clause?
    It's written in Dutch, I tried to translate it, so it might not be well written English.
    Excercise 192
    Distribution center 'One by one' wants to automate the distribution process.
    Items are distributed to the boxes one by one. Sorry, I can't figure out what Exercise 192 is, based on just that.
    It is similar to the next excercise, but this above was a lot more straight to the point.
    *Excercise 193*
    Distribution center 'All in one box' wants to automate the distribution process.
    One of the major changes in this process is to distribute items equally to all boxes in the same group.
    This means starting from the lowest quantity, assign the lowest quantity to all boxes in the same group if possible.
    If this is not possible distribute the amount of items divided by the number of boxes in the same group. If the amount of items per box is lower than 1 and not 0.
    Divide the remaining items per box ordered by the box with the highest quantity, till there are no items left.
    When it is possible to distribute the lowest quantity to all boxes, move up to the next box in the same group.
    When all boxes in the same group are filled to their maximum quantity, move up to the next group and repeat this process. ...
    So Exercise 193 is what you asked yesterday, right?
    A) Order the following information by box_group and max_qty as described.
    B) Calculate the distribution results for 60, 120, 170 items.
    When I have 60 items, the following output result should be
    box box_group max_qty assigned_from_60
    1   1         10      10  
    2   1         15      15
    3   1         40      17
    4   1         45      18
    5   2         15      0
    6   2         20      0
    7   2         20      0
    8   3         20      0Box 1 and 2 can be filled completely as you can fill atleast 10 to box 1,2,3,4 and an additional 5 to box 2, 3 and 4.
    The last item goes to the box 4.
    when I have 120 items
    box box_group max_qty assigned_from_120
    1   1         10      10  
    2   1         15      15
    3   1         40      40
    4   1         45      45
    5   2         15      3
    6   2         20      3
    7   2         20      4
    8   3         20      0
    Based on what you posted, it seems like the following should be equally acceptable:
    box box_group max_qty assigned_from_120
    1   1         10      10  
    2   1         15      15
    3   1         40      40
    4   1         45      45
    5   2         15      3
    6   2         20      4
    7   2         20      3
    8   3         20      0That is, the last 10 items have to be distributed among the 3 boxes in box_group=2 as equally as possible. So one box will get 4 items and the others will get 3. The extra item will go to the box with the highest max_qty, but in this case, there is a tie: box 6 has just as much of a claim to having the highest max_qty as box 7. The line marked "***** Add if needed *****" in the query blow guarantees that, in case of a tie like this, the box with the higher box value will be considered "larger" than another box with the same max_qty.
    when I have 170 items
    box box_group max_qty assigned_from_170
    1   1         10      10  
    2   1         15      15
    3   1         40      40
    4   1         45      45
    5   2         15      15
    6   2         20      20
    7   2         20      20
    8   3         20      5
    I accidentally posted the wrong query yesterday. This is what I should have posted:
    WITH     cntr     AS
         SELECT     LEVEL     AS n
         FROM     (  SELECT  MAX (max_qty)     AS max_max_qty
                 FROM    z
    --             WHERE   box_group     = :target_box_group          -- *****  Removed  *****
         CONNECT BY  LEVEL  <= max_max_qty
    ,     got_r_num     AS
         SELECT     z.box
         ,     c.n
         ,     ROW_NUMBER () OVER ( ORDER BY  box_group          -- *****  Added  *****
                                   ,            c.n
                             ,         z.max_qty     DESC
                             ,            box          DESC     -- ***** Add if needed  *****
                           )     AS r_num
         FROM     cntr     c
         JOIN     z          ON c.n     <= z.max_qty
    --     WHERE     z.box_group     = :target_box_group               -- *****  Removed  *****
    ,     got_assigned     AS
         SELECT       box
         ,       COUNT (*)     AS assigned
         FROM       got_r_num
         WHERE       r_num     <= :total_items
         GROUP BY  box
    SELECT     z.*,     NVL (a.assigned, 0)     AS assigned
    FROM          z
    LEFT OUTER JOIN     got_assigned     a  ON     z.box     = a.box
    ORDER BY     z.box_group
    ,          z.max_qty
    ;Yesterday, I described how you need to remove 2 lines and add 1, but the code I posted was the unchanged query. The query above is what I should have posted then. Look for comments beginning "*****" above for the changes. I apologize for my mistake.
    This query gets the results you posted for all 3 values of :total_items that you posted. If it doesn't work for some other value, or some other data, post the new values and the correct results you want from them, and point out where the query above is wrong.
    C) Sum the maximum quantities per group
    D) Get the amount of boxes in each group
    E) Create a column for remaining boxes per group
    F) For each distinct quantity, count the amount of boxes with this quantity
    G) Calculate how many items are required to fill all boxes in the same group
    H) Create a plan how to solve this distribution problem described in the introduction?
    I) Solve this problem using your plan.Are these the steps that the book suggests using?
    I don't understand that approach. It might be a good way to solve the problem without using a computer. It might be a good way to solve the problem using a procedural language, such as PL/SQL. It might be one way of solving the problem in SQL, but I think it will be more complicated and less efficient than what I psoted.
    The approach above is iterative; that is, you repeat certain steps, with different values. For example, you distribute a certain number of items to all boxes in a box_group. The you remove the smallest box(es) from the group, and repeat, distributing the remaining items among the remianing boxes. That's not hard to do in a language like PL/SQL, where you have loops and variables. In SQL, the closest thing to that is the MODEL clause. I'm sure you could write a MODEL solution to this problem, but, if your book hasn't mentioned MODEL yet, then that's certainly not what it's expecting you to do.
    Even using the approach in steps A) trhough G) above, I don't see how a PARTITION BY would help.

  • How to EDIT a particular Row in ALV using normal function module Reuse_alv_grid_display

    Hi experts..
    i got one requirement like i need to edit some rows particularly in alv....
    Edit in alv output....is it possible to get  that .....using normal function module with out using oops concept...
    could any one pls help me...

    Hi Pendurti ,
    If you want a particular field to be editable , simply define the fieldcatalog as
    wa_fieldcatalog-edit          = 'X'.
    wa_fieldcatalog-input         = 'X'.
    for that field.
    and
    Now when you use FM ' Reuse alv grid display '
    define USER_COMMAND
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = v_repid
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          it_fieldcat              = int_fieldcatalog
          is_layout                = wa_layout
        TABLES
          t_outtab                 = t_disp.
    and now in form USER_COMMAND ; code as per following
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
         DATA ref1 TYPE REF TO cl_gui_alv_grid.
         CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
             e_grid = ref1.
         CALL METHOD ref1->check_changed_data.
    endform.
    Regards,
    Yogendra Bhaskar

  • Previous quarter from the current date using Date functions

    hi all,
    how can i get the value of the previous quarter and previous month using using NOW() function in the formula.
    regards,
    Rk
    Edited by: Rk on Feb 13, 2009 9:28 AM

    Hi Pk,
    This "DSTR(DADD(NOW(),-1,'Q'),'YYYYQ')" will give you just an year 2008 (if you run this today).
    But this "DSTR(DADD(NOW(),-1,'Q'),'YYYYMM)" will give you an year and month of prev quarter
    200811(if you run this today)
    Ola

  • How to convert columns into rows using  transpose function

    Hi
    anybody tell me how to convert columns values into rows using transpose function.

    Since BluShadow went to all the trouble to put it together, someone should use it.
    See the post titled How do I convert rows to columns? here SQL and PL/SQL FAQ
    John

  • Using a function within a process flow...

    Hi,
    I'm trying to figure out a way of using a function (or something else) to return a status before attempting to run a mapping. I'd like to have a table with all my mappings, start date, end date, status, etc.
    1. SELECT status FROM table, if the mapping has already been executed do nothing, else execute the mapping, etc.
    Is there a way to accomplish that in OWB flow ?
    Thank you.
    Gaétan

    Hi,
    We had a similiar set up in my previous role where we have a Process flow for each mapping. Under that processflow, before attempting to run the mapping we called function to check whether that particular mapping has been run successfully for that date. The function would take "PF Name" as an input and returns the status as 1 (return success - the mapping was not run, so has to be run today)
    2 (return warning - the mapping is already run no need to run this time)
    3 ( any fatal errors).
    The function code is as below - _______________________________________________________
    CREATE OR REPLACE FUNCTION "PUB_CHECK_RUN_STATUS"("IN_ETL_PROCESS_FLOW_NAME" IN VARCHAR2) RETURN NUMBER IS
    --initialize variables here
    lv_Current_Load_Id NUMBER;
    lv_Last_Load_Id NUMBER;
    BEGIN
         <<Check_PF_Status>>                    -- This block is Standard for all Loads Jobs
         BEGIN
              SELECT LOAD_ID
              INTO lv_Current_Load_Id
              FROM LOAD_ADMIN.LATEST_LOAD;
              SELECT LAST_COMPLETE_LOAD_ID
              INTO lv_Last_Load_Id
              FROM LOAD_ADMIN.ETL_PROCESS_FLOW
              WHERE ETL_PROCESS_FLOW_NAME = in_ETL_Process_Flow_Name;
              IF Lv_Last_Load_Id = lv_Current_Load_Id
              THEN
                   -- This Process Flow has already been completed during this Load, so do not re-run
                   RETURN 2;          -- Returns a Warning Status
              ELSE
                   -- This Process Flow has not completed during this load, so need to run this now
                   RETURN 1;          -- Returns a Success Status
              END IF;
         END Check_PF_Status;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 3;     -- Returns an Error Status
    RETURN NULL;
    END;
    In the above code
    LATEST_LOAD is a view which always returns one row with current load information (like load _id, start time etc)
    ETL_PROCESS_FLOW is a table containing one row for each process flow with information like (execution status, load_id when it was execute )
    You can modify to suit your requirements.
    HTH,
    Mahesh

  • Problem using Ago function

    Hi all,
    My problem is that when i use ago function it displays next months value for example first column shows balance of april month and next to it ago column displays balance of the may not march. I am really confused. Please help,
    AGO(SR02BriefIncome.sr02_cube.BALANCE, SR02BriefIncome.timesDim."times Detail", 1);

    Hi Nico,
    Another question in relation to Ago function; I need to get value/balance a year ago which is 12 months ago, and also previous year's last months balances; the problem is that Ago function takes only integer, I have tried to put a variable, Is there is way i can get balances of the previous year's last month because it will be much easier to get it using built-in ago function.
    Also i need help with your answer for thread How to use row values in Presentation or Administration for calculation
    Re: How to use row values in Presentation or Administration for calculation
    "Yes, I forgot this one. Of course, this solution work when you have a pivot column.
    If you talk about period to period comparison, really often I must do a share like this one : ($2-$5)/$5.
    And unfortunately, this is not possible in a calculated item. Is it ?"
    We have a lot of reports with inter-row calculations, we have already used a lot sql model but we would like use answer also. Can u explain it with exact examples or steps.
    thank you again,

  • Tabular form calculated summary row

    Hopefully this may be a quick question with either a yes or a no
    I have a tabular form with columns
    Project Name , Wk1 , Wk2 , Wk3 etc ,
    basically so PM's can track the hours against a project
    I have used the sum checkboxes to create a summary row
    but they also want a row that calculates how many hours remaining for each week under the week no cols , obviously subtracted ffrom the hours budget for each week assigned to the project and person
    I've done the summary and calculation in a view but this isn't acceptable as a UNION query in a tabular form
    I've also tried another region under the Tabular form but as the project name is a variable length its not easy keeping the Wk cols aligned
    thanks in advance
    Chris

    Hi Gus/Paul,
    I had the same requirements as you, resulting from the fact that newly added rows may not be visible to the user until he/she has scrolled down sufficiently, but, by lowering my standards (something I excel at :D ), I was able to find an acceptable compromise.
    As you probably noticed yourselves, when you "edit" the ADD button, you can see that a call is made to the addRow() javascript function. I therefore took a look at the javascript code - foolish really as I am an oracle DBA from the Jurassic period. Needless to say it scared the pants off me... So, fuelled by cowardice, I snatched at an inferior-but-dead-easy-to-implement alternative solution whereby the page is automatically "scrolled" to the bottom of the form when the "ADD" button is clicked.
    Should this "cop out" work for you, you can implement it in the following way:
    1. Create a new HTML region immediately after the tabular form, containing the following source: <font color="blue">&lt;a name="bottom_of_page"&gt;&lt;/a&gt;</font>
    2. Amend the action when the "ADD" button is clicked to scroll down to the new region by doing the following:
    - edit "ADD" button
    - Go to "Action when button Clicked" section
    - Amend "URL Target" from
    <font color="blue">Javascript:addRow();</font>
    <br>to
    <font color="blue">Javascript:addRow();window.location='#bottom_of_page'</font>
    <br>
    <br>Regards,
    Amr.

Maybe you are looking for

  • HT201269 I purchased a new computer and I want to sync my iphone and ipad to it in the future

    I have a new computer, and I want to use the new computer to sync my iPhone 5 and iPad 3 with at&t data

  • Metronome behaving strangely

    When I press the record button in GB 3.0.4 The level meter displays a pulsing level, but I hear no sound for the metronome until I depress a key on my MIDI keyboard. This remains true whether I have it set to "Count In" or not. Another curious proble

  • [SOLVED] Verifying systemd conversion

    Good Afternoon Fellow Archers, I have an x86_64 installation of Arch when Arch was still using sysV init. When systemd was recommended, I switched over as recommended. So my system should be pure systemd, at least so I think. And the changeover was f

  • Getting error in implementing Train.

    Hi, I am just trying my hand in implementing simple train. What I am doing is - 1) I have created one train region 2) Added two links in that with destination url mentioned. 3) Created two pages which extends this train region(mentioned these pages i

  • Is there really any reason to keep "On My Mac" calendars and contacts?

    I was wondering if anyone has deleted their "On My Mac" contacts or calendars in Address Book or iCal since upgrading to iOS5 and Lion. I haven't had any real issues by having both (aside from seeing duplicate birthdays in iCal), but is it really nec