Power Query M code
let
Source = YourTable,
AddedInRange = Table.AddColumn(
Source,
"InTargetRange",
each [Amount] >= 100 and [Amount] <= 500,
type logical
)
in
AddedInRange
Flags rows whose value falls between two thresholds, using Power Query's between-style comparison.
let
Source = YourTable,
AddedInRange = Table.AddColumn(
Source,
"InTargetRange",
each [Amount] >= 100 and [Amount] <= 500,
type logical
)
in
AddedInRange
M has no built-in BETWEEN keyword - chaining >= and <= with and is the standard way to express a range.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Conditional Column Based on a Value Range.