cancel
Showing results for 
Search instead for 
Did you mean: 

Webi Access to previous record of dataprovider to

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Henry_Banks
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

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

regards,

H

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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