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
Arul
Super User
Super User

Random With Duplicates

Hi All,

How can one will create the random numbers with duplicate in calculated column of Power BI?

 

Thanks,

-Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


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

Hi, @Arul 

According to your description, you want to create a calculated column that can return the random numbers but also with duplicates sometimes, right? I think you can achieve this using the Randbetween() function in DAX, you can try my steps:

  1. Create a calculated column:

 

Randon number between 1-15 = RANDBETWEEN(1,15)

 

  1. Change the column type to the “Whole number”:

v-robertq-msft_0-1616554067637.png

And you can get what you want.

You can download my test pbix file here

More info about the Randbetween() function in DAX

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, @Arul 

According to your description, you want to create a calculated column that can return the random numbers but also with duplicates sometimes, right? I think you can achieve this using the Randbetween() function in DAX, you can try my steps:

  1. Create a calculated column:

 

Randon number between 1-15 = RANDBETWEEN(1,15)

 

  1. Change the column type to the “Whole number”:

v-robertq-msft_0-1616554067637.png

And you can get what you want.

You can download my test pbix file here

More info about the Randbetween() function in DAX

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

@Arul , You can use rand and randbetween

Refer to my video: https://www.youtube.com/watch?v=LFAT7AEDk5Q

 

But not Sure on what you mean by "with duplicate in calculated column "

@amitchandak ,

 

I have refered that Video but the duplicate values that DAX function genearting are giving me the same values. But, I want to see the duplicate values with different numbers not the same numbers.

 

Thanks,

-Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


@Arul , can you please share an example.

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.