User Tools

Site Tools


transformations:intervalmerge

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
Next revisionBoth sides next revision
transformations:intervalmerge [2021/04/10 22:00] craigttransformations:intervalmerge [2021/04/14 14:25] – [See also] dmitry
Line 24: Line 24:
 \\  \\ 
 =====Remarks===== =====Remarks=====
-To create a lookup set that doesn't contain any "gaps" be sure to set the "less than" value one higher than the last value you want included in the range, and start the //following// pairing with that same value.+To create a lookup set that doesn't contain any "gaps" be sure to set the "less than" value one higher than the last value you want to be included in the range, and start the //following// pairing with that same value.
  
 ^Low  ^High  ^Label  ^ ^Low  ^High  ^Label  ^
Line 30: Line 30:
 |  4|  8| Range is 4 to __7__ (don't start with "5" or you'll lose "4")| |  4|  8| Range is 4 to __7__ (don't start with "5" or you'll lose "4")|
 |  8|  11| Range is 8 to __10__. (range end is "10" as "11" is excluded)| |  8|  11| Range is 8 to __10__. (range end is "10" as "11" is excluded)|
 +\\ 
 +A lookup pair (low, high) cannot have a "high" value that is equal to the "low" value.  This pairing will not return a match as there is no upper threshold.  e.g. with "1" as the low value and "1" (//exclusive//) as the high value, no actual upper threshold has been defined.\\
 +\\ 
 +//Interval merge// can also use text-based lookup ranges and values (see Example 2, below).\\
  
 \\  \\ 
 =====Examples===== =====Examples=====
  
-**Objective:**  Find what it feels like in Toronto during the year.\\+**Example 1:**  Find what it feels like in Toronto during the year.\\
  
 **Table 1:** Temperature in Toronto (Celsius) **Table 1:** Temperature in Toronto (Celsius)
Line 77: Line 81:
 |Nov |   9|Cold  | |Nov |   9|Cold  |
 |Dec |   3|Cold  | |Dec |   3|Cold  |
 +
 +\\ 
 +\\ 
 +**Example 2:** Use a letter-based merge to assign Names to letter ranges.
 +
 +**Table 1:** Names
 +^Name  ^
 +|Mary  |
 +|Sally  |
 +|Bob  |
 +|Max  |
 +|Bruce  |
 +|Tammy  |
 +|Chris  |
 +|Frank  |
 +|Zeek  |
 +
 +**Table 2:** Lookup ranges
 +^Low  ^High  ^Label  ^
 +|A  |F  |Range A-E  |
 +|F  |L  |Range F-K  |
 +|L  |S  |Range L-R  |
 +|S  |Z  |Range S-Y  |
 +|Z  |Zz  |Range Z  |
 +The high value of "Zz" is used in the last record since the low value cannot be the\\ same as the high value.  See //Remarks//, above.\\
 +
 +\\ 
 +**Action parameters:**
 +> Table to merge is "Table 2"
 +> Values in column "Name" (Table 1)
 +> Are greater or equal to "Low" (Table 2)
 +> And less than "High" (Table 2)
 +> Columns to merge is "Label"
 +\\ 
 +**Result:**
 +^Name  ^Label  ^
 +|Mary  |Range L-R  |
 +|Sally  |Range S-Y  |
 +|Bob  |Range A-E  |
 +|Max  |Range L-R  |
 +|Bruce  |Range A-E  |
 +|Tammy  |Range S-Y  |
 +|Chris  |Range A-E  |
 +|Frank  |Range F-K  |
 +|Zeek  |Range Z  |
 +
  
 \\  \\ 
 =====See also===== =====See also=====
 +  * [[transformations:lookup|Lookup]]
   * [[transformations:merge|Merge another table]]   * [[transformations:merge|Merge another table]]
 +  * [[transformations:crossmerge|Cross merge]]
   * [[https://community.easymorph.com/t/assign-value-from-conditions-based-on-a-table/2292|Community: Assign value from conditions based on a table (with downloadable example)]]   * [[https://community.easymorph.com/t/assign-value-from-conditions-based-on-a-table/2292|Community: Assign value from conditions based on a table (with downloadable example)]]
   * [[https://community.easymorph.com/t/example-of-using-interval-merge/1851|Community: Example of using Interval Merge (with downloadable example)]]   * [[https://community.easymorph.com/t/example-of-using-interval-merge/1851|Community: Example of using Interval Merge (with downloadable example)]]
   * [[https://community.easymorph.com/t/rules-on-2-or-more-tables/952|Community: Rules on 2 or more tables (with downloadable example)]]   * [[https://community.easymorph.com/t/rules-on-2-or-more-tables/952|Community: Rules on 2 or more tables (with downloadable example)]]
transformations/intervalmerge.txt · Last modified: 2021/07/19 02:24 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki