Miscellaneous topics that do not fit into specific categories.
The screenshots show two separate issues:
- The lab VM can’t see the downloaded
.pbixfile. - Inside the
.pbix, the SQL connection tolocalhost;AdventureWorksDW2020fails.
Use these steps to align with the PL‑300 lab setup so the file opens and connects correctly inside the lab environment.
- Download and place the lab files inside the lab VM
- In the browser inside the lab VM, open the PL‑300 lab GitHub repository and download the lab resources ZIP as instructed in the setup guide.
- Extract the ZIP to
D:\Allfiles(this path is required by the lab scripts). - Confirm that the
.pbixfile (for example,02-Starter-Sales Analysis.pbix) is located underD:\Allfilesor the folder specified in the lab instructions. - In Power BI Desktop on the lab VM, use File > Open, browse to
D:\Allfiles\..., and open the.pbixfrom there. Avoid using a file that was downloaded on the local (non‑lab) machine, because the lab VM cannot see that local Downloads folder.
- Ensure the SQL Server lab instance is installed and running
The error
DataSource.Error: Microsoft SQL: A network-related or instance-specific error occurred... DataSourcePath=localhost;AdventureWorksDW2020indicates that the SQL Server instance required by the lab is not available in the lab environment. Follow the PL‑300 lab setup steps on the lab VM:- Install SQL Server Database Engine (Developer edition) on the lab VM, as described in the lab setup guide.
- During installation, accept the default instance or create the instance that the lab expects (used as
localhost). - Restore or attach the
AdventureWorksDW2020database using the scripts or backup files provided in theAllFilesDownloadpackage. - After installation, verify that the SQL Server service is running and that the database
AdventureWorksDW2020exists. - In Power BI Desktop on the lab VM, open the
.pbixfromD:\Allfilesagain. The connection stringlocalhost;AdventureWorksDW2020should now succeed.
- If using an existing SQL Server instead of the lab instance
If a different SQL Server instance is used, update the connection string in Power BI Desktop to point to that instance name instead of
localhost, as allowed by the lab setup guidance.
Once the .pbix file is opened from the correct folder on the lab VM and the SQL Server instance with AdventureWorksDW2020 is available, the lab steps (including opening Power Query Editor) should work as described.
References: