> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PNL

The PNL table contains Profit & Loss and Product Control data.

<table><thead><tr><th>Column Name</th><th>Type</th><th>Not Null</th><th>Default Value<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" role="doc-noteref">1</a></sup></th><th>Cube Field</th><th>Description</th></tr></thead><tbody><tr><td>AS\_OF\_DATE</td><td>DATE</td><td>Y</td><td /><td /><td>Timestamp (at close of business) for the data.</td></tr><tr><td>TRADE\_KEY</td><td>STRING</td><td>Y</td><td>N/A</td><td /><td>The field contains the <code>tradeID</code> for full data, or <code>Book#VaR Inclusion#PLDriver</code> for summary data.</td></tr><tr><td>TRADE\_ID</td><td>STRING</td><td>Y</td><td><em>DATAMEMBER</em></td><td><a href="../cube/dimensions/booking">Trades</a></td><td>If TRADE\_ID comes from multiple systems, you may need to prepend source system to the ID for uniqueness. <note><p>In certain cases, the TRADE\_ID could be for adjustment purposes. In such cases we might only have one PnL vector per Book or desk.</p></note> The TRADE\_ID should contain this information clearly (ADDON or ADJ). Example: “IR\_IRSWAP\_LIBOR3M”, “EQ\_12345677”, etc.</td></tr><tr><td>DAILY</td><td>DOUBLE</td><td>Y</td><td>0</td><td /><td>The DTD PnL value.</td></tr><tr><td>MONTHLY</td><td>DOUBLE</td><td>Y</td><td>0</td><td /><td>The MTD PnL value.</td></tr><tr><td>YEARLY</td><td>DOUBLE</td><td>Y</td><td>0</td><td /><td>The YTD PnL value.</td></tr><tr><td>LIFETIME</td><td>DOUBLE</td><td>Y</td><td>0</td><td /><td>The LTD PnL value.</td></tr><tr><td>TYPE</td><td>STRING</td><td>Y</td><td>N/A</td><td><a href="../cube/dimensions/pnl">Types</a></td><td>The type of PnL.Example: ‘Actual PL’</td></tr><tr><td>PLDRIVER</td><td>STRING</td><td>Y</td><td>N/A</td><td><a href="../cube/dimensions/pnl">PL Drivers</a></td><td>Driver for the PnL value.Example: ‘Market moves’</td></tr><tr><td>IS\_FULL\_REVAL</td><td>STRING</td><td>Y</td><td>N/A</td><td><a href="../cube/dimensions/pnl">IsFullRevals</a></td><td>Indicates whether the PnL comes from a full revaluation in the risk engine.</td></tr><tr><td>CCY</td><td>STRING</td><td>Y</td><td>N/A</td><td><a href="../cube/dimensions/currencies">Currencies</a></td><td>The currency of the PnL value.</td></tr><tr><td>MARKET\_DATA\_SET</td><td>STRING</td><td>Y</td><td>N/A</td><td>This field is not currently used</td><td>The market data set that should be used when retrieving rates for FX conversion.</td></tr><tr><td>BUCKET</td><td>STRING</td><td>Y</td><td>N/A</td><td><a href="../cube/dimensions/pnl">Buckets</a></td><td>Placeholder for a set of risk factors that are grouped together by common characteristics.</td></tr><tr><td>LEG\_ID</td><td>STRING</td><td>N</td><td>N/A</td><td><a href="../cube/dimensions/booking">Legs</a></td><td>Optional input to send in trades that will have multiple legs under a single TradeId. Only available when the property <a href="../properties/config-properties/mr-pnl-config"><code>mr.pnl.enable.leg-id</code></a> is set to true. If using this field, please update your SQL script to include it.</td></tr></tbody></table>

## Unique Key

<table><thead><tr><th>Columns</th></tr></thead><tbody><tr><td>AS\_OF\_DATE</td></tr><tr><td>TRADE\_KEY</td></tr><tr><td>TYPE</td></tr><tr><td>MARKET\_DATA\_SET</td></tr></tbody></table>

## Outgoing Joins

<table><thead><tr><th>Target Table</th><th>Source Columns</th><th>Target Columns</th></tr></thead><tbody><tr><td><a href="./trade_attributes">TRADE\_ATTRIBUTES</a></td><td>AS\_OF\_DATE<br />TRADE\_KEY</td><td>AS\_OF\_DATE<br />TRADE\_KEY</td></tr></tbody></table>

***

1. If the default value is marked as empty, it means that the default value is 'null' for nullable fields, and that a value needs to be explicitly set for non-nullable fields.
    [↩︎](#fnref:1)
