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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gomezc73
Helper IV
Helper IV

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
v-xuxinyi-msft
Community Support
Community Support

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
v-xuxinyi-msft
Community Support
Community Support

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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