--- title: "CombinedDimensionNS" slug: "combineddimensionns" updated: 2022-02-09T19:16:12Z published: 2022-02-09T19:16:12Z canonical: "docs.datajet.app/combineddimensionns" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # CombinedDimensionNS ## General Functions: CombinedDimension_NS ## Create a new discrete field from the concatenated string values for field 1 to 6. No separator is used to delimit the component values. ## Purpose Use this function to: - Build unique keys for creating joins - Create an input field for performing a FirstDiscrete on one or more fields ## Return Value | **FieldType** | String | | --- | --- | | **FieldSize** | low-med-high | | **DataType** | discrete | | **DataSize** | Byte / Short / Integer | `[field1Value][field2value]` e.g. `clothes2020-01-12` ## Parameters | **Component** | **JSON** | **Description** | | --- | --- | --- | | #### **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | Optional. Must come from target table. Records not in the filter will have a null value in the resulting field. | | #### **Fields [1-6]** | “p1”: “Field1Name” … “p6”: “Field6Name” | All fields must come from target table. All discrete Field Types are supported. At least 1 field must be specified If a continuous key field needs to be used in a combined dimension, first transform the key field using the CONCAT function. | | #### Include Null | “includeNull”: | If selected/true, then any null values in Fields1-6 will be included and denoted using null. e.g. `clothesnull` or `null2019-0101` | ## JSON sample ```json { "method": "BuildBakedField", "project": "D3", "targetTable": "transactions", "overwrite": true, "name": "product-date-ns", "function": "combineddimension_ns", "p1": "product", "p2": "date" } ``` ```json { "method": "BuildBakedField", "project": "D3", "targetTable": "transactions", "overwrite": true, "name": "product-date-ns-2020", "function": "combineddimension_ns", "p1": "product_group", "p2": "date", "dataSet": { "logic": "or", "name": "Year_2020", "strict": true, "set": [ { "logic": "and", "stype": "FIELD", "entity": { "type": "field", "name": "transactions.Year", "table": "transactions", "valueFilter": [] }, "op": "=", "values": [ "2020" ] } ] } } ``` JSON for CombinedDimension_NS supports the same parameters as [CombinedDimension](https://datajetsoftware.atlassian.net/wiki/pages/resumedraft.action?draftId=472383532) ## Usage Notes It is possible for the combination of values for the specified fields to exceed the maximum calculation size for the function. If this happens, use CombinedDimension_NS more than once in order to create the required result. See Also: - [CombinedDimension](https://datajetsoftware.atlassian.net/wiki/pages/resumedraft.action?draftId=472383532) (General Functions) - Engineering | Expression Field ## Example | ### Create product-date-ns key field | | --- | | - Table: = Transactions - Function: = CombinedDimension_NS - Filter:= [No Filter] - Field 1: = product - Field 2: = date - Include Null = False - Name = product-date-ns | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634108934505.png) | | ### Create product-date-ns-2020 key field | | - Table: = Transactions - Function: = CombinedDimension_NS - **Filter:= [Year=2020]** - Field 1: = product - Field 2: = date - Include Null = False - Name = product-date-ns-2020 | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634108934535.png) |