FEEL expression examples: a practical cheat sheet

Common FEEL patterns for DMN decision models, grouped by task. Every result on this page was computed by a real FEEL engine at build time; the Try it links open each expression in the free online FEEL evaluator, where a context editor supplies variables.

Arithmetic & numbers

FEEL has one decimal number type; standard operator precedence applies.

1 + 2 * 3
(1 + 2) * 3
2 ** 8
256 exponentiation Try it →
decimal(10 / 3, 2)
3.33 division, rounded to 2 digits Try it →
modulo(17, 5)
max(1, 5, 3)

Strings

Strings concatenate with +; positions are 1-based.

"Hello, " + "FEEL"
Hello, FEEL Try it →
upper case("feel")
substring("expression", 1, 4)
string join(["a", "b", "c"], "-")
replace("2026-07-24", "-", "/")
2026/07/24 regex replace Try it →
string length("FEEL")

Dates, times & durations

Temporal arithmetic is built into the language: add durations to dates, subtract dates to get durations.

date("2026-07-01") + duration("P3D")
2026-07-04 date plus 3 days Try it →
date("2026-12-24") - date("2026-07-24")
PT3672H difference as duration Try it →
date and time("2026-07-24T10:00:00") + duration("PT2H30M")
2026-07-24T12:30 Try it →
day of week(date("2026-07-24"))
Friday Try it →
years and months duration(date("2000-01-01"), date("2026-07-24"))
P26Y6M Try it →
date("2026-07-24").month
7 component access Try it →

Lists & filters

Square brackets filter or index a list: a boolean filter keeps matching items, a number picks by position (negative counts from the end).

[1, 2, 3, 4][item > 2]
[3, 4] filter Try it →
[1, 2, 3][-1]
3 last element Try it →
sum([1, 2, 3, 4])
sort([3, 1, 2])
[1, 2, 3] Try it →
for x in [1, 2, 3] return x * 2
[2, 4, 6] map with for Try it →
distinct values([1, 2, 2, 3])
[1, 2, 3] Try it →

Conditionals & quantifiers

if requires an else branch; some / every quantify over lists.

if 5 > 3 then "yes" else "no"
some x in [1, 2, 3] satisfies x > 2
every x in [1, 2, 3] satisfies x > 0
if list contains([1, 2, 3], 4) then "found" else "missing"
missing Try it →

Contexts

Contexts are the records of FEEL, written {name: value}; entries can reference earlier entries.

{name: "Anna", age: 34}.age
34 entry access Try it →
{a: 1, b: a + 1}.b
2 entries may build on earlier ones Try it →
context put({x: 1}, "y", 2)
{x=1, y=2} Try it →
{scores: [80, 92, 75]}.scores[item > 78]
[80, 92] filter inside a context Try it →

Decision table unary tests

DMN decision table cells contain unary tests: comparisons, ranges and value lists evaluated against the input. The in operator applies a unary test to a value, exactly like a decision table cell does.

5 in (< 10)
true comparison test Try it →
5 in [1..10]
true closed range Try it →
15 in [1..10]
"b" in ("a", "b", "c")
true list of values Try it →
4 in (<= 3, >= 4)
true matches if any test matches Try it →
date("2026-07-24") in [date("2026-01-01")..date("2026-12-31")]

Looking for a specific built-in? See the complete FEEL function reference, or the FEEL vs B-FEEL comparison.