This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
is there a way to create a stablel random list bwtween, two numbers; so a staable list 1 to 10 could be
= List.Transform(
List.Random( 20,1), (x)=>
Number.IntegerDivide( ( x * 10 ) ,1 )
) the problem is this method always starts at 1 and i would like to cntrol the min and max vaulues,
what i woud like is stable version of
List.Transform( {1..100},(x)=>
let n =
Number.IntegerDivide( Number.RandomBetween( 97, 122),1)
in
Character.FromNumber(n) ) any suggestions,
Richard.
Solved! Go to Solution.
You are missing the +min at the end to make it start from 97. If you run yours, the numbers won't start from min. Check the one I have shared for ten values (Count):
If this is not what you are looking for, please describe the ouput you are imaging for the function.
Regards
Happy to help!
Hello @Dicken ,
Can you try List.Random function?
You can check this.
If this solved your issue, please mark it as the accepted solution. ✅
Hi. Do you mean a list of random that even after a refresh will keep same values?
You could build it like the following code, specifying a seed to make it deterministic. Add a New blank query and create the function, you can call it getRandom:
(min as number, max as number, count as number, seed as number) =>
let
range = max - min + 1,
rnd =
List.Transform(
List.Random(count, seed),
each Number.IntegerDivide(_ * range, 1) + min
)
in
rnd
Then you can call it any where, for example using your nros as example:
getRandom(97,122,100,1)
That would generate 100 estable numbers between 97 and 122.
I hope that helps,
Happy to help!
Not sure i get this ;
let
range = max - min + 1,
rnd =
List.Transform(
List.Random(count, seed),
each Number.IntegerDivide(_ * range, 1) + min
)
in
rndit does not seem very different to what I posted, and haveing tried, i still have a range starting at 0 ,
can you show an actual example, where a random list stable List is produced between a min andn max valess say 10 an 20 ? I have tried the abvoe
let
range = (122 - 97)+1
in
List.Transform(
List.Random( 20, 1) , (x)=> Number.IntegerDivide( x * range , 1)
)and it just takes gvies range of 1 - 26 ?
Richard.
You are missing the +min at the end to make it start from 97. If you run yours, the numbers won't start from min. Check the one I have shared for ten values (Count):
If this is not what you are looking for, please describe the ouput you are imaging for the function.
Regards
Happy to help!
Thanks, think i've got it;
let
acount = 20,
max = 20 ,
min = 10 ,
range = (max - min) +1 ,
rnd =
List.Transform(
List.Random( acount , 1 ),
each Number.IntegerDivide(_ * range, 1) + min
)
in
rnd
Just trying to get the logic, i see it and then it slips away 😊
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |