0
0
Power BIbi_tool~10 mins

SharePoint and OneDrive sources in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to connect Power BI to a SharePoint folder source.

Power BI
let
    Source = SharePoint.Files("[1]", [ApiVersion = 15])
in
    Source
Drag options to blanks, or click blank then click option'
Aftp://sharepoint.company.com
Bhttps://company.sharepoint.com/sites/finance
Chttps://onedrive.live.com
DC:\Users\Documents
Attempts:
3 left
💡 Hint
Common Mistakes
Using a local file path instead of a SharePoint URL.
Using an FTP or OneDrive URL instead of SharePoint site URL.
2fill in blank
medium

Complete the code to filter files from OneDrive by file extension.

Power BI
let
    Source = OneDrive.Files(),
    Filtered = Table.SelectRows(Source, each Text.EndsWith([Name], [1]))
in
    Filtered
Drag options to blanks, or click blank then click option'
A".exe"
B".mp3"
C".xlsx"
D".jpg"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the dot before the file extension.
Using an unrelated file extension.
3fill in blank
hard

Fix the error in the code to correctly get files from a SharePoint document library.

Power BI
let
    Source = SharePoint.Files("[1]"),
    Filtered = Table.SelectRows(Source, each Text.StartsWith([Folder Path], "Shared Documents"))
in
    Filtered
Drag options to blanks, or click blank then click option'
Ahttps://company.sharepoint.com/sites/marketing/SharedDocuments
Bhttps://company.sharepoint.com/sites/marketing/Shared Documents
Chttps://company.sharepoint.com/Shared Documents
Dhttps://company.sharepoint.com/sites/marketing
Attempts:
3 left
💡 Hint
Common Mistakes
Including the document library name in the URL.
Using incorrect folder path syntax.
4fill in blank
hard

Fill both blanks to load Excel files from a SharePoint folder and expand their content.

Power BI
let
    Source = SharePoint.Files("[1]"),
    ExcelFiles = Table.SelectRows(Source, each Text.EndsWith([Name], [2]))
in
    ExcelFiles
Drag options to blanks, or click blank then click option'
Ahttps://company.sharepoint.com/sites/sales
B".xlsx"
C".docx"
Dhttps://company.sharepoint.com/sites/hr
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong site URL.
Filtering with the wrong file extension.
5fill in blank
hard

Fill all three blanks to connect to OneDrive, filter CSV files, and load their content.

Power BI
let
    Source = OneDrive.Files(),
    CSVFiles = Table.SelectRows(Source, each Text.EndsWith([Name], [1])),
    Imported = Table.TransformColumns(CSVFiles, { [2], Csv.Document, [3] })
in
    Imported
Drag options to blanks, or click blank then click option'
A".csv"
B"Content"
Ctype table
D"Name"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong file extension filter.
Transforming the wrong column.
Missing the data type specification.