Home
Designing Analytics Reports
mongodb dealing with embedded documents
Migrateduser
<p>I'm using Eclipse BIRT and am having problems understanding how to deal with embedded documents. In my database I have a structure a little like this:</p>
<p> </p>
<p>PORTFOLIO</p>
<p> date</p>
<p> time</p>
<p> name</p>
<p> aum</p>
<p> BASKET</p>
<p> stock</p>
<p> position</p>
<p> price</p>
<p> fx</p>
<p> </p>
<p>So, each portfolio has a basket of stocks. What I want to do is to calculate the net exposure for the portfolio as a % of aum. In mathematical terms this is:</p>
<p> </p>
<p><strong>sum(basket.price*basket.position*basket.fx)/aum</strong></p>
<p> </p>
<p>This should lead to one value per portfolio name</p>
<p> </p>
<p>What I don't know is how do do that roll up when setting up the DataSet. I tried creating a computed column but the numeric values come back as NaN. (see attached screenshot)</p>
<p> </p>
<p>Is anyone able to offer guidance?</p>
Find more posts tagged with
Comments
There are no comments yet