Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

New Member

How to hash string using sha1?

I have 4 variables i want to combine as a string and then use the hash them with sha1, the output should be a 40-char hexidecimal string, for example 6b76a4ede12897d42dabc2a5f9270bbdb76985af.


I want to do something like this

hash = sha1(callerId + time + key + unique)


Is there anyway i can use R-Script to do this?



Write your R script to hash string with sha1 following the instructions in this article .

Then you can use R.Excute(text) function to call the local R script as a data source in Power BI Desktop, for more details see this blog: .

There is also a similar thread for your reference:

Lydia Zhang

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

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors