Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Any idea how I can get the name & date modified columns with power query?
Hi @Brinki ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Brinki ,
I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.
Thank you.
Hi @Brinki ,
I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.
Thank you.
Hi @Brinki ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
If you're importing files (e.g., CSVs from SharePoint or a folder), and you want to retain file-level metadata such as Name and Date modified while expanding the file content in Power Query, the approach shared by @grazitti_sapna using M code is fully accurate and effective. It ensures:
The binary content is processed with Csv.Document, keeping the file metadata, which is then combined with the tabular data. The final result provides the necessary columns, with the content organized into a structured format.
Alternatively, as demonstrated by @MasonMA , the same can be achieved through the Power Query UI by:
As noted by @danextian , metadata columns remain available even after expansion, and @lbendlin rightly points out that although metadata is repeated for each row post-expansion, Power BI’s compression engine typically handles it efficiently.
Both the script-based and UI-driven methods provided above will meet your requirement. You can proceed confidently with either, depending on your comfort level with M code or GUI.
I hope this helps resolve your issue. If you need any more assistance, please feel free to reach out.
Thank you.
Hi @Brinki
Please try the below query:
let
// 1. Connect to SharePoint
Source = SharePoint.Files("https://your-site.sharepoint.com/sites/your-site-name", [ApiVersion = 15]),
// 2. Filter to specific folder
FilteredFiles = Table.SelectRows(Source, each Text.Contains([Folder Path], "Shared Documents/FolderName/")),
// 3. Keep only relevant columns
SelectedColumns = Table.SelectColumns(FilteredFiles, {"Name", "Date modified", "Content"}),
// 4. Add a column to parse CSV and promote headers
AddTables = Table.AddColumn(SelectedColumns, "Data", each try Table.PromoteHeaders(Csv.Document([Content], [Delimiter=","])) otherwise null),
// 5. Remove original binary Content column (optional)
RemovedContent = Table.RemoveColumns(AddTables, {"Content"}),
// 6. Expand the nested data tables
ExpandedData = Table.ExpandTableColumn(RemovedContent, "Data", {"Column1", "Column2", "Column3"}), // Replace with your actual column names
// 7. Optional: Reorder or format columns
FinalTable = Table.SelectColumns(ExpandedData, {"Name", "Date modified", "Column1", "Column2", "Column3"}) // Customize as needed
in
FinalTable
I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!
From UI, you may follow these steps,
1. To keep only needed columns, select the columns: 'Content', 'Name', 'Date modified', right-click and choose Remove Other Columns
2. Import file content
Csv.Document([Content], [Delimiter=";"])
3. Promote headers by clicking Use First Row as Headers on the top ribbon
4. Expand nested table
In the main query, click the expand icon beside the Data column
Select the columns you want to import (from your CSV conten)
Hi @Brinki
The other columns should still be available even if you expanded Content.
Do you really want these? The data in those columns would then be replicated in all rows of the expanded CSV files. Depending on the number of rows in each file that can add up (although in fairness these columns will compress very well in Vertipaq)
@Hello Brinki,
do you like removing all the columns except for these 2 columns ? if that so, simply click on shift or ctrl cant remember which one, and select with your mouse on the column name and date modified.
then right click on one of these 2 columns, --> remove other columns .
let me know if this is what you want. if not ,feel free to reply to my respond.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |