Create Parameters
Create two parameters…
DataMart_Host = bmt-dwh-uks-srv-prd.database.windows.net
DataMart_Endpoint = bmt_dwh_db_gl
Use a Token on myBMT
The token allows the Datawarehouse to identify with the source of the report, as PowerBI cannot send environment details. (answers on a postcard please, if you know how) So the token is used to give the report a unique identifier
myBMT | Token (bmt-dwh-uks-app-my.azurewebsites.net)
Navigate to the Workspace name where you report (will) reside
Either search for your report, if is exists, or create a new report title
Copy the Token…
Now Create an additional, parameter in Power BI for the token
DataMart_Token = myTokenGoesHere
Set get.myView as datasource
For example to get the 202404 (last stable version) of the project.details_plus DataMart…
Paste the statement below as a source in Power BI
= Sql.Database(DataMart_Host, DataMart_Endpoint, [Query="EXEC get.myView @dataMart = 'project', @viewName = 'details_plus', @token = '"& DataMart_Token &"', @version = '202404'"])
Please Note:
Please be aware the quotes are set right and there are no mid-statement line/return when you copy and paste
Set Access Policy
You will be asked to sign in using your Organisational Credentials, this will open the normal MS Entra/MFA window
KnowHow to get.myView statements
Use KnowHow to review what DataMarts are available and set the appropriate @dataMart and @viewName
If you are asked to test the latest development version then set the @version to ‘beta’
myBMT to view DataMart
Use myBMT to review any DataMart