I have a client wanting a spreadsheet that can take a quicken qif export file from their investment account and analyse it in Excel. I asked about Power BI and they are looking into it but right now just in Excel for more extensive graphing.
I can import the file and see the data, etc. Each row in the file is identified by a single character that indicates the type of data (eg. Y = Name of Company/Investment, D = date, N = Transaction Type).
Each transaction record can span 4-8 rows or so. Each record is ended with a ^ as the only character on the line.
For an initial step I have promoted the !Type:Invst row to a column header and split the first character off into it's own column.
I would like to take the initial character column and somehow pivot those into column headers. Ideally with each series of rows that make up one record will show up as one row under the proper columns. Not all column headers are in each record.
I tried to use the code from *AlienSX and alansidman in the post here but this code appears to assume the same number of rows for each record and instead of putting null in when column data doesn't exist, it combines the rows from records below with those above when they are missing.
QIF Data will look something like:
!Type:Invst
D12/14' 9 - note this is Dec 14, 2009
NBuy
YRoyal Bank
I124.55 - unit price
Q10
U1255.45
T1255.45
O9.95
^
D2/ 9'21
NContribX
U6,000.00
T6,000.00
M2021 Contribution
L[Savings]
$6,000.00
^
D2/15'24
NDiv
YRoyal Bank
U48.14
T48.14
^
for three records. After the ^, it just starts at the D row again.
The D, N, Y, I Q, U, T, and O should be the column headers and any others that show up in other records. The are in their own column right now. Occasionally I see an M for Memo and L row but not in all records (see middle transaction above).
Can anyone point me in the right direction? I was going to look at using VBA to parse the data but thought I would try Power Query first because I am trying to learn how to use it properly. Right now I only have one sample file of about 6000 records for about 10 years in one investment account but I am told there are 20 years of data he is looking at using from about 8 different accounts.
TIA rasinc
I can import the file and see the data, etc. Each row in the file is identified by a single character that indicates the type of data (eg. Y = Name of Company/Investment, D = date, N = Transaction Type).
Each transaction record can span 4-8 rows or so. Each record is ended with a ^ as the only character on the line.
For an initial step I have promoted the !Type:Invst row to a column header and split the first character off into it's own column.
I would like to take the initial character column and somehow pivot those into column headers. Ideally with each series of rows that make up one record will show up as one row under the proper columns. Not all column headers are in each record.
I tried to use the code from *AlienSX and alansidman in the post here but this code appears to assume the same number of rows for each record and instead of putting null in when column data doesn't exist, it combines the rows from records below with those above when they are missing.
QIF Data will look something like:
!Type:Invst
D12/14' 9 - note this is Dec 14, 2009
NBuy
YRoyal Bank
I124.55 - unit price
Q10
U1255.45
T1255.45
O9.95
^
D2/ 9'21
NContribX
U6,000.00
T6,000.00
M2021 Contribution
L[Savings]
$6,000.00
^
D2/15'24
NDiv
YRoyal Bank
U48.14
T48.14
^
for three records. After the ^, it just starts at the D row again.
The D, N, Y, I Q, U, T, and O should be the column headers and any others that show up in other records. The are in their own column right now. Occasionally I see an M for Memo and L row but not in all records (see middle transaction above).
Can anyone point me in the right direction? I was going to look at using VBA to parse the data but thought I would try Power Query first because I am trying to learn how to use it properly. Right now I only have one sample file of about 6000 records for about 10 years in one investment account but I am told there are 20 years of data he is looking at using from about 8 different accounts.
TIA rasinc