Skip to Content
Former Member

Webi Variable calculation to select previuos records

Hello, We need to implement the variable calculation with below conditions 1) If Status(of latest record in Table 1) = 13 or 15 then send A else 2)if status(of the latest record in Table1) = 16 then send B else 3) If Status(of the latest record in Table1) = 20,29 or 30 then send C else 4)if Status (of latest record in table1) = 34,35,36 send D else 5) if Status(of the latest record in Table1)= 17,18,19 the previous record of Table1 must be checked to find the most recent record with Status = 13,15,16,20 and mapping rule 1,2,3,4 must be applied accordingly.

Can anyone please help how to compare latest record with all previous records in BO or DB? Does it need changes in the universe or can be implemented at report level.

Add comment
10|10000 characters needed characters exceeded

1 Answer

• Jan 11, 2017 at 11:23 AM

try something like this.

First get the latest record by below variable.

V Latest=Max([your object]) in ([Status])

then final variable like

=if([your object]=([V Latest] where [Status]=13)) then "Send A" elseif...

Add comment
10|10000 characters needed characters exceeded
• Former Member

Can you please advise how to implement the last condition?

5) if Status(of the latest record in Table1)= 17,18,19 the previous record of Table1 must be checked to find the most recent record with Status = 13,15,16,20 and mapping rule 1,2,3,4 must be applied accordingly

How can we compare the latest record with previous records in a table?