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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
gomezc73
Helper V
Helper V

Generate a random number to download a data

Hi Experts,

 

  I need ideas for the following request.

 

  Let me explain,

 

  I have a powerBi Desktop to generate a data and the user can download it to excel.

 

  In one of the column of the downloaded data the user need an "unique identifier" or "next number" unique. to identify each excel file.

 

  Then i thinking generate it using a combination with the date and time (seconds inclusive) to be sure the "identifer" will be unique..

 

  But I don't know if PowerBi have commands to help with this request..

 

  The only premise is that there cannot be 2 Excel files with the same identifier.

 

  Any ideas will be be appreciatte,

 

Regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @gomezc73 

 

Thanks for the reply from Syk .

 

@gomezc73 , the following testing is for your reference.

 

My sample:

vxuxinyimsft_0-1724828725435.png

 

Create a calculated column as follows

Column = UTCNOW()

 

vxuxinyimsft_1-1724828794848.png

 

You can do a refresh operation first when you download as excel.

vxuxinyimsft_2-1724829053945.png

 

Output in excel

vxuxinyimsft_3-1724829094519.png

 

vxuxinyimsft_4-1724829123911.png

 

Best Regards,
Yulia Xu

 

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

5 REPLIES 5
Anonymous
Not applicable

Hi @gomezc73 

 

Thanks for the reply from Syk .

 

@gomezc73 , the following testing is for your reference.

 

My sample:

vxuxinyimsft_0-1724828725435.png

 

Create a calculated column as follows

Column = UTCNOW()

 

vxuxinyimsft_1-1724828794848.png

 

You can do a refresh operation first when you download as excel.

vxuxinyimsft_2-1724829053945.png

 

Output in excel

vxuxinyimsft_3-1724829094519.png

 

vxuxinyimsft_4-1724829123911.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!!. I made test days ago and I found the same response in a video in youtube using additionally the command RANK to generate a unique identifier. the only issue is that i had to create a button to allow the user refresh the data and it take a long of time. i don't know what happen with PBI but the time is not updated automatically.
Syk
Super User
Super User

In Power Query you can create an index column which will set a unique identifier for each row.

Thank you for your early response,

 

The identifier that i need is not related with the data, it must be related with the date/time when the user download the data generated to excel.

 

By example, if the user generate the same data with the same parameters, by example for July 2024.

 

Then the user must have two identical excel files, the only difference between them is the identifier..

Ahh... I don't think Power BI would be much help for you there. It sounds like a python sort of use case to me.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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