Forum Discussion
Generating random dates between a time frame
Hi all,
I have a dummy dataset that does not have a date column, Is there a way of generating random dates between a time frame in Power BI?
Hi Anonymous ,
According to your description, here is my solution.
You can create a calculated column by using RANDBETWEEN function.
I made a sample for you to reference.
Column = RANDBETWEEN(DATE(2022,10,1),DATE(2022,11,20))Final output:
Remember that the data type of the "column" should be "DATE" or "DATE/TIME".
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-xiaosun-msftCommunity Support
Hi Anonymous ,
According to your description, here is my solution.
You can create a calculated column by using RANDBETWEEN function.
I made a sample for you to reference.
Column = RANDBETWEEN(DATE(2022,10,1),DATE(2022,11,20))Final output:
Remember that the data type of the "column" should be "DATE" or "DATE/TIME".
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.