I need to compare the previous row value for one column.Database is Db2 and its relational type.
Below is the condition in BRIO..We need to use the function below and need to update in Cognos
--------------------------------
BRIO condition for the column:
if (ProdTYPE] = "CONT" And @[Flag] ="Y" AND (prior ('ProdTYPE') = "LEASE" )) Then
Prior ( Amount) } else {Amount }
--------------------------------
How to fetch previous row value in Cognos?
you need to create 2 queries
Query1: with running-count(rows) and
Query 2: with running count(rows)-1
Create an outer join on Query 2 on running-count data items
How to get the previous row value
See Gopinath's reply