Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
I am loading 12 files from SharePoint into Power BI, with each file representing a specific period or month. Since this information is not present within the files, I extract it from the file path. To incorporate this data, I have created a new column called "Period."
= Table.AddColumn(#"Filtered Rows", "Custom", each Text.Middle( [Folder Path], 123, 11))
I want to add the "Period" column to each data file to label each row with the corresponding period.
Can you help?
Hi,
When you say '12 files,' are these Excel files that you are trying to combine? And once you combine them, should each row have a period assigned to it? Something like that? Any sample data or screenshot you can provide to show what you're trying to do here?
I need to include Periodic_01 from the folder path.
I already created the column Period which has that part from the path.
Try this
= Table.AddColumn(#"Filtered Rows", "Period", each Text.AfterDelimiter([Folder Path], "/", {0, RelativePosition.FromEnd}), type text)
it is returning blank
Can you share me the 1-2 path for me to understand and give you proper response
https://rsbsb.sht.com/sites/O365-SAPLInventoryModel/Shared Documents/General/01_Periodic_Loads/Current_Year/Actual/Periodic_01/
= Table.AddColumn(#"Filtered Rows", "Period", each Text.AfterDelimiter([Folder Path], "/Actual/"), type text)
try this please
@Khushidesai0109 , I know how to extract the part I want, what I need help with how to add this column to the data in each file.
Steps to Add "Period" to Each File's Data in Power BI
You are currently working with metadata (file details) before expanding the contents. That’s the right place to extract Period, so ensure this step happens before combining the files.
Once expanded, the extracted "Period" column should still be present from the earlier step. However, if it's missing after expansion, follow these steps:
If the "Period" column is lost after expansion, explicitly add it using:
(This ensures "Period" from metadata is applied to the expanded table.)
I could not see the column Period after the expanssion, so I applied the code in point 4, but I get this error:
Expression.Error: The name 'LookupTable' wasn't recognized. Make sure it's spelled correctly.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
93 | |
60 | |
44 | |
35 | |
34 |