MapRange
Rescales a number, or every number in a column, from one range onto another, for example turning raw dollar figures into a 0–100 score. A value at the bottom of the input range maps to the bottom of the output range, the top maps to the top, and everything in between keeps its proportional position.
Inputs
| Input | Accepts | Required |
|---|---|---|
Value | Any | Yes |
FromMin | Value (a single number) | Yes |
FromMax | Value (a single number) | Yes |
ToMin | Value (a single number) | Yes |
ToMax | Value (a single number) | Yes |
Outputs
| Output | Produces |
|---|---|
Result | Any |
Settings
Typed in on the node or set by the assistant, not wired.
| Setting | Default | Notes |
|---|---|---|
FromMin | 0 | Bottom of the input range. Default 0. |
FromMax | 100 | Top of the input range. Default 100. |
ToMin | 0 | Bottom of the output range. Default 0. |
ToMax | 1 | Top of the output range. Default 1. |
Example
You are building a branch scorecard where each metric should read on a 0–100 scale. Branch revenue runs from $1.2M to $4.8M, so set FromMin to 1200000, FromMax to 4800000, ToMin to 0, ToMax to 100. A branch at $3.0M lands at exactly 50; one at $4.35M scores 87.5. Repeat with a second MapRange for cost efficiency and the two scores are directly comparable on one chart.
Tips
Values outside the input range are not cut off; a branch at $5.1M would score above 100. Add a Clamp node after MapRange if scores must stay inside the target range.