Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to generate random seeded values

hi everyone

 

is there a way to seed the random value generated by DAX

 

tried the below link but every time i open the file the numbers still changes 

Solved: Re: How to generate random number based on seed va... - Microsoft Power BI Community

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Change it.

Table = Addcolumns(GENERATESERIES(1,100,1), "New col", RAND())

The final show:

vyalanwumsft_0-1665652965689.png

If not right , can you share your simple file and the result what you want to output?


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Change it.

Table = Addcolumns(GENERATESERIES(1,100,1), "New col", RAND())

The final show:

vyalanwumsft_0-1665652965689.png

If not right , can you share your simple file and the result what you want to output?


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Try if this code can help. I done something similar in past, that code is not handy

Addcolumns(generate(1,100,1), "New col", var _1= rand() return _1)

Anonymous
Not applicable

@amitchandak generate(1,100,1) returning error for this part

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.