Forum Discussion
Create a date custom column by file date
Hi everyone,
I daily download a .csv file that has no date reference. I'd like to create a custom column that sets the date by the 'file modified date' (or similar).
any ideas?
Thanks!
Instead of combining binaries, add a custom column with formula =Csv.Document([Content]).
This will give you a table with the file contents, which can be expanded without losing the "date modified".
The "Content" column can be removed after you added the custom column.
10 Replies
- AnonymousNot applicable
Anonymous
Did you try this?
1. get data
2. select folder option
3. specify the path of the file
4. now you can see the file properties and choosethe field you want and add it as column
5. have that column in the slicer
- AnonymousNot applicable
Hi Anonymous, thanks for your help
I think i'm missing the step where 'i choose the field i want and add it ass column' (and later on, step 5). Usually, when i get a .csv from a folder, i use the 'combine binaries' button, and all of the other columns disappear.
Before combining binaries
After combining binaries
- MarcelBeugCommunity Champion
Instead of combining binaries, add a custom column with formula =Csv.Document([Content]).
This will give you a table with the file contents, which can be expanded without losing the "date modified".
The "Content" column can be removed after you added the custom column.
- Greg_DecklerCommunity Champion
OK, this is just a working theory, but if you use a Folder query, you can get the last modified date. So I'm thinking that perhaps creating a custom function where you grabe the "Date Modified" from a folder query wrapped in your function that you could return this back as a value for a custom column in the query. Perhaps ImkeF has a better way, she is the M code expert.