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
RMDNA
Solution Sage
Solution Sage

Pulling a source's file name into table as a field

Hi all,

 

I have a report built from .csv files in Blob storage. All the .csv files are titled "model_output_[timestamp]).

 

What I'd like to do is pull that timestamp into the table as a field so I can concat it into a column of "Model_[timestamp]" and join it to an ever-growing master list of model results.

 

Another thing I've tried is referencing the table at the "import CSV" step to get a list of the files, then pulling the timestamp out of the tilename. At that point, though, there's nothing to tie it back to the correct table (example below).

 

a.PNG

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@RMDNA,

 

You may use Text.BetweenDelimiters to add a custom column.

Text.BetweenDelimiters([Filename], "[", "]")
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

 

I already have the timestamp column, but would need it to carry over to the table once it's expanded, however. That's what I'm looking for - a column in a table referencing its source file's name.

 

Maybe this will help. The "model iteration" column is what I'm trying to create. At the moment, I'm copy-pasting the correct timestamp. What I'd like to do is pull the timestamp from my previous picture into this table so I can create that column.

 

a.PNG

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.