Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am trying to create an example of a streaming dashboard in Power BI using a javascript random number generator with a date stamp. I have created the Javascript to get the values I need, but I don't know how to use the URL or cURL or Powershell to publish the fake data my Javascript is producing. Any help would be greatly appreciated.
Solved! Go to Solution.
Hi @Anonymous,
Do you store the values somewhere? If not, I would suggest you use JS to push the data into Power BI. Please refer to the demo below.
1. Install Node.js.
2. Install the module "request".
3. Try the code below.
var request = require('request');
// the URL of Power BI streaming dataset.
var target_url = "https://api.powerbi.com/beta/*************************g%3D%3D"
// the data to push. It should be the values generated by JS to you.
var raw_data = {'ID': 1999, 'Name': "Jack"}
// convert a object to JSON.
var data_to_post = JSON.stringify(raw_data)
const req = request.post(target_url, data_to_post, (error, res, body) => {
console.log(`Status code: ${res.statusCode}`);
});
req.on('error', (e) => {
console.log("error: " + e.message);
});
req.write(data_to_post);
req.end;
Best Regards,
Hi @Anonymous,
Do you store the values somewhere? If not, I would suggest you use JS to push the data into Power BI. Please refer to the demo below.
1. Install Node.js.
2. Install the module "request".
3. Try the code below.
var request = require('request');
// the URL of Power BI streaming dataset.
var target_url = "https://api.powerbi.com/beta/*************************g%3D%3D"
// the data to push. It should be the values generated by JS to you.
var raw_data = {'ID': 1999, 'Name': "Jack"}
// convert a object to JSON.
var data_to_post = JSON.stringify(raw_data)
const req = request.post(target_url, data_to_post, (error, res, body) => {
console.log(`Status code: ${res.statusCode}`);
});
req.on('error', (e) => {
console.log("error: " + e.message);
});
req.write(data_to_post);
req.end;
Best Regards,
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |