User Tools

Site Tools


transformations:group

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transformations:group [2016/06/19 19:09] dmitrytransformations:group [2021/09/13 22:46] (current) craigt
Line 1: Line 1:
-===== Group =====+{{ transformations:GroupAction.png}} 
 +====== GROUP ====== 
 +Category: Transform / Advanced\\
  
-Replace multiple values with a single value (constant or calculated).+\\  
 +=====Description===== 
 +Replace multiple values with a single value (constant or calculated). \\
  
-** Use cases ** +\\  
-  * Creating flags that can later be used in expressions. In this case the flag will designate a group (set), therefore verifying if a value belongs to the group can be done by checking the flag. For instance, instead of expressions with multiple comparisons, e.g. <code>if([x]='A' or [x]='B' or [x]='C' ...) </code> it can be more convenient to flag A, B, C,.. with 'Yes' using Group transformation, and then rewrite expressions using the flag:  <code>if([Flag]='Yes', ...) </code> +=====Use cases===== 
 +  * Creating flags that can later be used in expressions. In this case the flag will designate a group (set), therefore verifying if a value belongs to the group can be done by checking the flag. For instance, instead of expressions with multiple comparisons, e.g. <code>if([x]='A' or [x]='B' or [x]='C' ...) </code> it can be more convenient to flag A, B, C,.. with 'Yes' using the //Group// action, and then rewrite expressions using the flag:  <code>if([Flag]='Yes', ...) </code> 
   * Group values for charts (e.g. changing insignificant dimension values to "Other")   * Group values for charts (e.g. changing insignificant dimension values to "Other")
   * Calculating new values of a column only for particular values in another column, leaving the rest unchanged.   * Calculating new values of a column only for particular values in another column, leaving the rest unchanged.
 +  * Create secondary demographic sets, combining specified values into rollup groups.
  
-** See also ** +\\  
-  * [[syntax:functions:in]] +=====Action settings===== 
-  * [[syntax:functions:match]]+^Setting^Description^ 
 +|Create/Replace column|Select whether the results will replace the values in an existing column or be created in a new column.\\  Options: //Create new column// (and provide a column name), or //Replace existing// (and select an existing column).| 
 +|Group (flag) as<sup>*</sup>|Provide a static value or expression that will be used as the flag value.  All selected values will be converted\\ to this value. Options:  //It's an expression// or //It's a text or number//. | 
 +|Lookup column|Select the column with the values to be grouped.  Once chosen, a list of values present in the column will be\\ displayed at the bottom of the action settings pane. | 
 +|Grouping|Choose whether the selected values will be replaced with the group (flag) value, or whether all values //except//\\ the selected values will be replaced.  Options: //Group selected//, or //Group all but selected//.| 
 +|Value selection|Select the values to be replaced, or excluded from replacement, in the list.| 
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]]. 
 + 
 +\\  
 +=====Remarks===== 
 +Values that are not converted to the group (flag) value retain their original value. 
 + 
 +This action replaces whole, selected values within the //Lookup column//, and does not work on partial matches.\\ 
 + 
 +\\  
 +=====Examples===== 
 +(coming soon) 
 + 
 + 
 +\\  
 +=====See also===== 
 +  * [[syntax:functions|Functions In()]] 
 +  * [[syntax:functions|Functions Match()]]
transformations/group.1466377788.txt.gz · Last modified: 2016/06/19 19:09 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki