Skip to Content
avatar image
Former Member

Webi Access to previous record of dataprovider to

hello all, i am trying to access a particular row in a data provider in my webi.

here is my table

so as the days progress, i want the previous records data. so, if the day today is 5/7/12, how can i  return the Revenue Measure for the previous record, i.e. 37,342.35

thanks in advance

pastedImage_0.png (24.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    May 22, 2012 at 09:31 AM

    Hi

    =Previous([Revenue]) Where ([Calendar Day]=RelativeDate(CurrentDate();-1)) to get the Revenue value for the previous day

    =Previous(([Revenue]) Where ([Calendar Day]=CurrentDate()) to get the value of the previous record of the current date

    Regards

    RR

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi ranjani

      thanks for this, though i had to make sure both dates were the same format

      here is my format. i did not need to use the previous day, after all.

      = [Revenue] Where ( ToDate([Calendar day];"d/mm/yyyy") = ToDate(CurrentDate();"d/mm/yyyy"))

      cheers

  • avatar image
    Former Member
    May 07, 2012 at 11:25 AM

    Hi,

    Try below.

    In Universe:

    Create a measure object which has data for the previous date like

    Select Sum(****) from ******* where date =sysdate-1;

    In report

    Try using Previous( ) function available if DB is Oracle.

    Cheers,

    Suresh A

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi suresh, unfortunately we are not over a universe. also the table you see above, is a table in the webi report, so i am trying to find a way using the webi functions e.g. self() etc ...

  • May 21, 2012 at 08:54 AM

    Hi,

    i believe you need to use a formula variable, and the 'set' function called 'Lag'.

    regards,

    H

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi henry, i afraid you have assumed to  much of me here. can you help out with an example of what you mean. ta. glen

  • avatar image
    Former Member
    May 21, 2012 at 09:47 PM

    Hi Glen,

    You can use Previous or RelativeValue function.

    =RelativeValue([Revenue];([Calendar day]);-1) will give previous rows revenue value for each row.

    =Previous([Revenue]) will do the same. With RelativeValue function you can go to "n" days back or forward via changing "-1" parameter.


    pastedImage_0.png (12.5 kB)
    Add comment
    10|10000 characters needed characters exceeded