Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good day,
After several attempts of executting a specific javascript within PQ web.page
So i decided to save the HTML that contains the javascript that generates the signed certificate to a central location to be a web source within PBI. When clicking the html file the javascript executes and results to the web output, I would like to grab the output generated as a source value to be passed on
1. Html file as web source, but how do i get the web viewer text data in the preview to be loaded?
2. Within pbi, how do i refresh the html file's JavaScript execution like F5 on browser so that new javascipt result is generated?
Please Any Help?
Regards
Hi @icassiem ,
For your first question, I think you can store the HTML to a file and then use a binary data type to store the file path. When loading the data into Power BI Desktop, you will get a column (named Column1) that lists the HTML file path, such as C:\Users\username\Desktop\filename.txt, and then, you can add a custom column in Query Editor mode that contains the following M code:
Custom column=Web.Page(File.Contents([Column1]))
For your second question, I think you can perform a refresh operation using the Power BI REST API. Use the Power BI service to authenticate and get an access token. Initiate a dataset refresh using the POST /refreshes endpoint. This triggers JavaScript execution in the HTML file. You can read the documentation below for more information: Enhanced refresh with the Power BI REST API - Power BI | Microsoft Learn and Solved: Re: Power bi javascript api data refresh - Microsoft Fabric Community
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank You @v-yilong-msft
Point1
I have tried a few things and below i return an text result BUT not the expected text value, it completely differs from what the HTML is is displaying, the starting char are always "ey.." but this starts "W3sf.."
let Source = Web.Page(File.Contents("file:///C:/Temp/test2.html")),
// Source = Web.Page(Web.Contents("file:///C:/Temp/test2.html"))
// Source2 = Json.FromValue(Web.Contents(Source))
Source2 = Json.FromValue(Source),
// Source2 = Json.Document(Source),
Source3 = Binary.ToText(Source2)
in Source3
Point2
I have previously tried using PBI REST API that required app reg on Azure using the token but could never get it working for PBI Usage Matrix report, i have admin access to a test azure , do i need to register the api app again?
Kindly provide examples on how to ahcieve this and how to be used to refresh the HTML Javascript file please?
Regards
Hi,
Another lost cause, i just cant get this javascript S256 ssassign KUR to generate secret
The HTML Web Table does not work due to the resul being javascipt generated result and only works when Table in HTML Source
"Power Query does not recognize HTML tables with just one row"
"This method works only if the table is available in the page source and doesn't require JavaScript to render it."
Have run out of options, is there a way of using powershell/dataverse or something in PBI to help me refresh the javascript but is allowed a a data source refresh within PBI Service
?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
28 | |
26 | |
22 | |
22 | |
18 |
User | Count |
---|---|
52 | |
34 | |
28 | |
24 | |
21 |