Rushi,
I've worked pretty heavily on this subject. If you want TTM revenue, you'll need to try something similar to this. If you read through this thread of mine you'll see that the docs say GetFundamental isn't usable in backtesting (even though right now it is), and that getting historical fundamental data is difficult in general. But, you can do some pretty neat things if you can get it to work properly.
In the attached algorithm the most recent revenue figure (threemonths) is obtained by using GetFundamental for all stocks in very crude manner, although you can probably make this more efficient (and you can change the dates to get historical values).
However, if you don't need historical fundamental data and you just need the most recent quarter's fundamental data, it might be better to not use GetFundamental at all since it's pretty slow. In the attached algorithm I get market cap and shares outstanding without GetFundamental.