Assign a date to transaction level detail with Power Query

Excel in Excel

New Member
Joined
May 11, 2017
Messages
2
Hi there,

I have a daily report (.csv format) that can have anywhere from one or two, to several hundred transaction for the day. The report date is always displayed in cell C3 of the .csv file, but it is NOT displayed in a column next to each individual transaction. I would like to have this date information displayed next to each transaction so that when I combine all days into a single file, I can create a pivot table and summarize by date/week/month, etc.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I found a way to shortcut this for my scenario. The file name for all of my .csv files contains the date as the first 8 characters. In order to add the date as its own column, first I pull in all the files in the folder, then I add a custom column and use function =Csv.Docment([content]). Next, I expand this new custom column to display the contents of the files. Then I am able to create a custom column and use the function =Text.Start([File Name],8); this gives me a brand new column with a date next to every single transaction. I can then filter the data any way I want in the query to exclude certain rows, columns, etc. Seems to be working quite nicely.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,842
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top