Forum Discussion
GerryL
4 years agoFrequent Visitor
List.Numbers Within a Range
Hello,
I'm trying to generate a list of numbers in my dataset within a range from 10-50 in an increment of 10. In other words, as it generates the number for each row, when it gets to 50, it should go back to 10. I can't figure out a way to do this with List.Numbers.
8 Replies
- Vijay_A_VermaMost Valuable Professional
Let's say you want to generate 18 numbers...Use below formula (replace 18 with the required number as per your need)
= List.Generate(()=>[x=10,i=1], each [i]<=18, each [i=[i]+1, x=if [x]=50 then 10 else [x]+10], each [x])- GerryLFrequent Visitor
Thanks. This isn't working. It says a Token Comma is expected.
- Vijay_A_VermaMost Valuable Professional
You can't replace () with anything else. Everything else is correct. It has to be
=List.Generate(()=>[x=10...........