To get the all numbers between 2 numbers.
Discussion posts and replies are publicly visible
If by "between" you mean "including the lower and upper values" then this would work for you:
if( ri!lower > ri!upper, fn!tointeger({}), fn!enumerate(ri!upper - ri!lower + 1) + ri!lower )
...where ri!upper and ri!lower are integer values.
If you want to exclude the lower/upper values then that would be a small tweak to the above code.