Wiki Markup |
---|
{anchor:top} {toc: class=contents} h2. Overview {styleclass: Class=topLink}[top|#top]{styleclass} Calculated fields allow you to create basic calculations with the fields available in your report. {color:#C00000}*Note:*{color} a calculated field that you create in the report builder cannot be used across multiple reports. It is unique to your report only. If you create a set of calculated fields you wish to use across multiple reports you can either: # Request the calculations to be included in the View by your administrator or # Copy the report containing the calculations using the copy function - the copied report will contain the new calculated fields as well. h3. Why Use Calculated Fields? When an administrator designs a View they may not create all the variables that you are likely to need in the course of your report writing. The intention of a view is to provide you with sufficient fields for you to be able to write the report you need and to use some of these fields as the basis for more complex calculations. h2. Simple Formula {styleclass: Class=topLink}[top|#top]{styleclass} Simple Formulas allow you to build calculations using the formula builder button interface. These may range from very simple addition or multiplication through to CASE statements. # Click the *+* button at the bottom of the field list in the Data step of the report builder. !01addCalc.png|thumbnail,border=1! # The Calculated Field window will now appear. You will need to define the following: ## Provide a name for your formula in the *Calculated Field Name* box. This will be used as the field name in your table and/or chart output. ## Select *Simple* from the *Formula Type* drop down list. ## Use the formula buttons and field drop down list to add components to your calculation. You cannot type directly into the calculation area of the window, each part of the formula needs to be added using buttons. Yellowfin will not permit you to select combinations of variables that are incompatible - therefore options that are greyed out will become active as you add in elements. {color:#CC0000}*Note:*{color} if you wish to type your calculation you may need to use the [Freehand SQL|Calculations#Freehand SQL] option discussed later. !02buildCalc.png|thumbnail,border=1! # Once finished click the *Validate* button to ensure your calculation is not missing any components. !03validateCalc.png|thumbnail,border=1! # Click *Save* to complete your calculation. It will now be available in a folder called calculated fields at the bottom of the field list in the Data step. !04useCalc.png|thumbnail,border=1! h2. Pre-Defined Formula {styleclass: Class=topLink}[top|#top]{styleclass} Using a pre-defined formula you can add calculation to your report that will be based on formula rules defined by an administrator or are system default. # Click the *+* button at the Addbottom of calculatedthe field linklist locatedin atthe theData bottomstep of the datareport fieldsbuilder. panel.!01addCalc.png|thumbnail,border=1! # AThe calculatedCalculated fieldField popupwindow will now open. Insertappear. You will need to define the following: ## Provide a name for your new column. And use the formula builder to build your calculationformula in the *Calculated Field Name* box. This will be used as the field name in your table and/or chart output. ## ChooseSelect a '*Pre-Defined Formula'* from the formula*Formula typeType* drop down list. ## Choose the formula you wish to apply - the selection is specific to the type of database that your data is sourced from. !05selectFn.png|thumbnail,border=1! ## OnceYou youwill havenow chosenbe yourprovided formulawith youoptions willto becomplete promptedyour tocalculation. selectClick theon appropriateeach fieldsparameter forto thedefine formulait. # You can validate your calculation to determine whether it will work correctly. Click the validation link to do this.!06defineParam.png|thumbnail,border=1! ## Provide a value using one of the options provided. These will vary depending on the type of value required. !07defineValue.png|thumbnail,border=1! # Click *Save &* Close to savecomplete your newcalculation. calculated field. It!08saveFn.png|thumbnail,border=1! # Your calculation will now be available in a folder called calculated fields. at Youthe willbottom haveof to drag the newfield fieldlist fromin the CalculatedData Fieldsstep. folder onto your report. !09useFn.png|thumbnail,border=1! h2. Freehand SQL {styleclass: Class=topLink}[top|#top]{styleclass} h2. Edit a Calculated Field {styleclass: Class=topLink}[top|#top]{styleclass} # To edit a formula for a calculated field open the Calculated Fields folder. # Select the field you wish the edit. It should be highlighted and an edit icon will be visible at the right of the field's name. # Click the edit icon and the formula popup will open. # Edit your formula and click OK when completed to close the popup and save your changes. h2. Delete a Calculated Field {styleclass: Class=topLink}[top|#top]{styleclass} To delete a calculated field from your report entirely # Select the field from the calculated field category # Click the edit icon and the formula popup will open # Click the delete link to delete the field. The popup will close and return you to the report page. \\ \\ {horizontalrule} {styleclass: Class=topLink}[top|#top]{styleclass} |
Page Comparison
General
Content
Integrations