If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

LEAD/ LAG Functions

Started by EArumugam, 03 Sep 2009 06:36:48 AM

Previous topic - Next topic

EArumugam

HI ALL,

How can i achieve the below example using LEAD/LAG function in FM or RS.


Actual Table looks like..

Name date             amount
AAA   01/01/09       1000
AAA    01/02/09       750
AAA    01/03/09       650
AAA    01/04/09        350

i need to add a query subject in FM like 'Difference amount', after that it shud be display as below


Name date             amount  Difference amount
AAA   01/01/09       1000         250(1000-750)
AAA    01/02/09       750          100(750-650)
AAA    01/03/09       650           300(650-350)
AAA    01/04/09        350         350 (same as amount bocs last line)

i acheive above using SQL in oracle.
but i donknow how implement in FM .


gskumar

Hi,
        IT is query item, so you need to add caluclation and apply the logic what you got in sql.
Cheers,
Sirish

EArumugam

i am getting the following error while applying the same logic..

QE-DEF-0478 Invalid coercion from 'measure' to 'member'