Hello,
Is there an easy way to generate a list of all numbers between two numbers , by giving only the first and the last number , via usersettings?
In an app, the user should imput
Field 1 : 4
Field 2: 7
Result : (4,5,6,7) (list)
Thank you very much
Solved! Go to Solution.
Itโs possible with a relatively small number of numbers within a limited range:
(
TOP(
list-of-possible-numbers,
last-number
)
- TOP(
list-of-possible-numbers,
(first-number - 1)
)
)
Using your example values:
(
TOP(
LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
7
)
- TOP(
LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
(4 - 1)
)
)
Note that list-of-possible-values must be in order and contain no duplicate values.
Itโs possible with a relatively small number of numbers within a limited range:
(
TOP(
list-of-possible-numbers,
last-number
)
- TOP(
list-of-possible-numbers,
(first-number - 1)
)
)
Using your example values:
(
TOP(
LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
7
)
- TOP(
LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
(4 - 1)
)
)
Note that list-of-possible-values must be in order and contain no duplicate values.
I tried a table with a column with numbers from 1 to 200 , and a conditional slice of that table based on first and last number , so I can extract as list the sliceโs column.
I was hoping to dump this workaround , and your solution seems perfect.
Thank you very much !
Thatโs a great approach for a larger list of numbers!
SORT(
SELECT(
All Numbers[Number],
AND(
([Number] >= first-number),
([Number] <= last-number)
)
)
)
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |