Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jagostinhoCT
Post Partisan
Post Partisan

sharepoint folder query not syncing all text files

Hello,

 

Not being able to get all txt files saved on a sharepoint folder.

If I sync the folder locally and and use that as a DataSource they all show. But not if reading from a sharepoint folder.

 

Any ideas why this might be happening?

 

Thank you.

 

PIB_KBT not syncing.png

 

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @jagostinhoCT,

 

1. Did you filter the data? As we can see from your image, you applied some filters. Please refer to the snapshot below.

sharepoint-folder-query-not-syncing-all-text-files

2. Did it happen recent two days? There was an issue related to this, which had been fixed.

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply @v-jiascu-msft.

 

I did filter rows but the text files missing should not be affected by it.

 

I also just refreshed the dataset and it is still not showing.

Is there a limit to the number of rows? I am running on the free PBI version.

 

Here is my complete code from the Advanced Editor.

 

 

let
Source = SharePoint.Files("https://mysite", [ApiVersion = 15]),
#"Filtered Rows - Online Folder" = Table.SelectRows(Source, each Text.EndsWith([Folder Path], "DataSources/KBT/") and not Text.Contains([Name], "WarningsFile")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows - Online Folder",{{"Name", Order.Descending}}),
#"Removed Columns" = Table.RemoveColumns(#"Sorted Rows",{"Name", "Extension", "Date accessed", "Date created", "Attributes", "Folder Path"}),
#"Filtered Hidden Files1" = Table.SelectRows(#"Removed Columns", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from KBT Logs - Logs OD4B 2", each #"Transform File from KBT Logs - Logs OD4B 2"([Content])),
#"Removed Other Columns1" = Table.SelectColumns(#"Invoke Custom Function1",{"Date modified", "Transform File from KBT Logs - Logs OD4B 2"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File from KBT Logs - Logs OD4B 2", Table.ColumnNames(#"Transform File from KBT Logs - Logs OD4B 2"(#"Sample File (3)"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Column1", type text}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "Column1", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, false), {"Column1.1", "Column1.2"}),
#"Sorted Rows1" = Table.Sort(#"Split Column by Delimiter",{{"Column1.2", Order.Ascending}}),
#"Split Column by Delimiter1" = Table.SplitColumn(#"Sorted Rows1", "Column1.2", Splitter.SplitTextByAnyDelimiter({"\\", "C:", "D:", "L:\", "X:\"}, QuoteStyle.Csv, false), {"Column1.2.1", "Column1.2.2"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter1",{{"Column1.2.1", type text}, {"Column1.2.2", type text}}),
#"Split Column by Delimiter2" = Table.SplitColumn(#"Changed Type2", "Column1.2.2", Splitter.SplitTextByEachDelimiter({"\"}, QuoteStyle.Csv, true), {"Column1.2.2.1", "Column1.2.2.2"}),
#"Changed Type3" = Table.TransformColumnTypes(#"Split Column by Delimiter2",{{"Column1.2.2.1", type text}, {"Column1.2.2.2", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type3",{{"Column1.2.1", "WindowName"}, {"Column1.1", "Username"}, {"Column1.2.2.1", "FilePath"}, {"Column1.2.2.2", "FileName"}}),
#"Duplicated Column - FileName" = Table.DuplicateColumn(#"Renamed Columns", "FileName", "FileName - Copy"),
#"Extracted Last Characters - File type" = Table.TransformColumns(#"Duplicated Column - FileName", {{"FileName - Copy", each Text.End(_, 3), type text}}),
#"Renamed Columns1" = Table.RenameColumns(#"Extracted Last Characters - File type",{{"FileName - Copy", "File type"}, {"FilePath", "File path"}, {"FileName", "File name"}}),
#"Extracted Date" = Table.TransformColumns(#"Renamed Columns1",{{"Date modified", DateTime.Date, type date}}),
#"Sorted Rows - Date Modified" = Table.Sort(#"Extracted Date",{{"Date modified", Order.Descending}})
in
#"Sorted Rows - Date Modified"

Anonymous
Not applicable

Hi jagostinhoCT,

 

Did you try change the ApiVersion to 14?


Source = SharePoint.Files("https://mysite", [ApiVersion = 14])

 

I've tried and the .txt file finally shown.

 

 

Hi @jagostinhoCT,

 

The information is limited. 

1. You filtered the [Folder Path] with "DataSources/KBT/" while the logs are in KBTLogs. Please check out.

2. Can you search for it?

3. Can you see it before you did any operations?

4. How many files are there?

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.