# Fixed

&#x20;Returns a fixed value specified by the 'value' parameter.\
&#x20;       @param value Type can be string or number

This function is helpful when a user wants to get a fixed value from a dataset (or set of column values).

### Example 1:&#x20;

Step 1: Create an empty **fixed\_example** using AIOps studio as shown in the below screenshot.

![Empty 'fixed\_example' pipeline](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mc_es8gt4mi0sQcmccs%2F-Mc_fFcaO1KWfxQ_qqzx%2FScreen%20Shot%202021-06-19%20at%2012.08.52%20PM.png?alt=media\&token=d12ff845-5029-48c5-a8a6-8a23996151b9)

Step 2: Add the following pipeline code/commands into the above-created pipeline as shown in the below screenshot:

You can copy the below code into your pipeline and execute that in your environment.\
\
\&#xNAN;*`##### This pipeline creates a list of rows with sales amount (int values) for each month`* \
*`##### using AIOps studio.`*\
\
*`##### RDA function fixed is used to demo this example (along with groupby, sum)`*\
*`##### TOTAL is used as a variable on which sum is performed to get the total sales`*\
*`##### amount for all six months (RDA uses agg = "sum" to calculate sum of all sales`*\
*`##### and provide the output of the total amount. Here TOTAL is used as an additional`*\
*`##### dummy column to allow RDA to calculate the sum.`* \
\
*`@dm:empty`* \
*`--> @dm:addrow amount = 10000 & month = 'Jan'`*\
*`--> @dm:addrow amount = 15000 & month = 'Feb'`*\
*`--> @dm:addrow amount = 11000 & month = 'Mar'`*\
*`--> @dm:addrow amount = 18000 & month = 'April'`*\
*`--> @dm:addrow amount = 8000 & month = 'May'`*\
*`--> @dm:addrow amount = 10000 & month = 'June'`*\
*`--> @dm:map to = "TOTAL" & func = "fixed" & value = "TOTAL"`*\
*`--> @dm:groupby columns = "TOTAL" & agg = "sum"`*\
*`--> *dm:filter * get TOTAL, amount`*<br>

![Pipeline code is added to and saved.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McfSCdQPiqzj3ZFHWUO%2F-McfT4uSfgp-6KzLJ3Lf%2FScreen%20Shot%202021-06-20%20at%203.09.00%20PM.png?alt=media\&token=7cffd99c-107b-423d-8df5-19f01030bb8e)

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

![AIOps Studio RDA verifies pipeline code without any errors.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McfTcLAMb1an35RPJ0c%2F-McfTe2HiJ3wljb2pgyf%2FScreen%20Shot%202021-06-20%20at%203.11.23%20PM.png?alt=media\&token=c52828ea-ae1d-4d51-9712-5b866e8dceb8)

Step 4:  Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

![AIOps studio executes pipeline code without any errors](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McfU2nmOdGSszLkqa-V%2F-McfUQUGyYySd0j3lxg8%2FScreen%20Shot%202021-06-20%20at%203.14.54%20PM.png?alt=media\&token=6dcbb9e3-b31c-4547-ad2f-c7261cc2ee4c)

Step 5: RDA uses the dm function 'fixed' to use a dummy column across all the available rows and provides a sum of 'amount' columns (which are defined in int') and provides an aggregate/sum value in the amount column after pipeline execution as shown in the below screenshot.

&#x20;

![pipeline code uses RDA function 'fixed' to calculate sum of all amounts and display the amount.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-McfX7wOTPrsePwLON-5%2F-McfXcL4Ds4dq7tUnARW%2FScreen%20Shot%202021-06-20%20at%203.28.48%20PM.png?alt=media\&token=57bbb4f7-bb73-457c-b653-7276de6bdfb4)
