Add a Fact Table
Add a fact table to an existing subject area.
- Sign in to your service.
- In Oracle NetSuite Analytics Warehouse Console, click Semantic Model Extensions under Application Administration.
- On the Semantic Model Extensions page, click User Extensions. You see the main and existing customization branches.
- In the User Extensions region, under Customization Branches, click a branch to open the Branch page.
- On the Branch page, click Add Step.
- In Add Step, select Add a Fact. You see the wizard sequence to add a fact.
- In step 1 of the wizard, enter a name for your customization step, for example, Add Travel Expense and add a brief description.
- Select a target subject area to which you want to add the fact. For example, Financials - AP Expense.You see the details of the selected subject area.
- Click Next.
- In step 2 of the wizard, select the schema, and then select a view or table or synonym as the object. For example, FCT_CALC_Extensions.You see the fact table for the selected object.
- In the details of the fact table for the selected source table, click the Select Fact and Use for Key check boxes for the source columns that you want to add to your new fact table in the target subject area.
- Optional: In the details of the fact table for the selected source table, under Select Degen Attribute, click the check boxes for the attributes for which you need the degenerate dimension to be created.
- If any of the selected attributes have been removed or modified in the source table since the last refresh, then you see such columns highlighted and a message asking whether you want to update the table. Select OK in the message to reload the source columns. If you want to review the changes to the source columns, then click Cancel in the message, and later click Refresh to reload the source columns. If any of the attributes that you haven’t selected have been removed or modified in the source table, then you see the refreshed list of source columns. If any of the custom columns fail validation during the refresh, then you see a message asking you to resolve the cause of failure and revalidate.
- Optional: Click Create Column to add a new column to your new fact table in the target subject area using these instructions:
- In Create Column, enter a display name.
- Under Data Elements, search for a data element from the physical table of the selected dimension table.
- From the search results, double-click the data element to place it in the text pane.
- Under Functions, search for a function to construct a column using expressions. For example, search for functions like "substring" or "concatenate" to construct new expression-based columns. From the search results, double-click the applicable result to add it to the central text pane.
- Click Validate, and then click Save.
- Click Next.
- In step 3 of the wizard, use the Diagram or Tabular tabs to specify the joins to link your new fact table to the dimensions in the selected subject area. Follow these instructions to specify the joins using the Diagram tab:
- Click Add Table.
- In Add Table, select the dimensions to add and click OK.
- Drag from the dimension's port (dark green circle) to the fact table's port (brown circle) to create a join link. You see the Join dialog.
- In the Join dialog, select the type of join, the fact table column, and the dimension key column. Click Add Join Condition to add multiple join conditions and then click Join. If you want to provide expressions as join conditions, then click Complex Join and in Create Joins, click Add Joins, select the target and source logical tables, enter the join condition as an expression, and click OK.
Follow these instructions to specify the joins using the Tabular tab:- Click Add Join.
- In Add Table, select the dimension to add and click OK. You see the Join dialog.
- In the Join dialog, select the type of join, the fact table column, and the dimension key column. Click Add Join Condition to add multiple join conditions and then click Join. If you want to provide expressions as join conditions, then click Complex Join and in Create Joins, click Add Joins, select the target and source logical tables, enter the join condition as an expression, and click OK.
- Optional: Click Skip Joins if you don’t want to join a dimension now.
- Click Next.
- In step 4 of the wizard, select the aggregation rule for each fact column to set the aggregation behaviors.
- Optional: You can set the time-balanced aggregation rule for a time dimension and hierarchy level-based aggregation rule for a dimension using these steps:
- For a fact column, click the Time-Balanced Aggregation icon.
- In the Time-Balanced Aggregation dialog, click Add Time Dimension, adjust the aggregation rule, and then click OK.
- For a fact column, click the Hierarchy Level-Based Aggregation icon, select the dimension and level. Click Add Dimension to add more dimensions. Click OK.
Use a time-balanced aggregation when the added measure mustn't be "aggregated" by default across a time dimension. Oracle NetSuite Analytics Warehouse supports non-aggregation types like "Last" or "First" in place of the "SUM" aggregation type when required. Use a level-based aggregation when the underlying measure must always be calculated to a specific level of a predefined dimensional hierarchy. For example, in a product hierarchy that has the Product Total, Product Category, Product Sub-Category, and Product Details levels, you add a new measure called "Revenue" and need this "Product Category Revenue" measure to be aggregated to Product Category, then you must use the level-based aggregation and choose the right level of the Product Dimension. This setting enables Oracle NetSuite Analytics Warehouse to always aggregate and show the value of the measure at the Product Category level. This is useful when you need to calculate Product Revenue as a % of Category Revenue.
- Click Next.
- Optional: Select additional subject areas to add the fact.
- Click Finish. You see a message that your step is being applied to the customization branch. After it's applied, you see the new customization step in the customization branch. You can now apply the customization branch to the main branch or edit it to add more steps.