rudi.prozesky
New member
- Joined
- Jun 8, 2017
- Messages
- 2
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 365 ProPlus
Hello.
I've gone through the blog posts and been bumping my head with this for a few hour now. I'd greatly appreciate any help. I'm sure I'm missing something something small.
I have an excel table named "tbl_Parameters" with the following contents:
I wrote a fnGetParameter connection:
(ParameterName as text) =>
let
ParamSource = Excel.CurrentWorkbook(){[Name="tbl_Parameters"]}[Content],
ParamRow = Table.SelectRows(ParamSource, each ([Parameter] = ParameterName)),
Value=
if Table.IsEmpty(ParamRow)=true
then null
else Record.Field(ParamRow{0},"Value")
in
Value
I started my Query:
let
FilePath = fnGetParameter("FAM Depreciation File Path"),
Source = Csv.Document(File.Contents(FilePath),[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"JE Line Internal ID", Int64.Type}, {"FAM Internal ID", Int64.Type}, {"Asset", type text}, {"Asset Type", type text}, {"Subsidiary", type text}, {"Transaction Amount", type number}, {"Depreciation Posting Reference", type text}, {"Date Created", type datetime}, {"Depreciation Date", type date}, {"Depreciation Account", type text}, {"Period", type date}})
in
#"Changed Type"
And I get this error:
DataSource.Error: Could not find file 'Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Depreciation tie to GL YTD 06-17'.
Details:
Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Depreciation tie to GL YTD 06-17
Thanks for looking at this!
Rudi
I've gone through the blog posts and been bumping my head with this for a few hour now. I'd greatly appreciate any help. I'm sure I'm missing something something small.
I have an excel table named "tbl_Parameters" with the following contents:
Parameter | Value |
Workbook File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\ |
FAM Additions File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Additions for Month (Based on when Assets Generated) YTD 06-17 |
Balance Sheet Detail File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\Balance Sheet Detail by Account YTD 06-17 |
FAM Transfers File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Transfers for FAM Accounts This Fiscal Year to Report Ran Date 06-17 |
FAM Sales Disposals File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Assets Sales & Disposals This Fiscal Year to Report Ran Date 06-17 |
FAM Depreciation File Path | Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Depreciation tie to GL YTD 06-17 |
I wrote a fnGetParameter connection:
(ParameterName as text) =>
let
ParamSource = Excel.CurrentWorkbook(){[Name="tbl_Parameters"]}[Content],
ParamRow = Table.SelectRows(ParamSource, each ([Parameter] = ParameterName)),
Value=
if Table.IsEmpty(ParamRow)=true
then null
else Record.Field(ParamRow{0},"Value")
in
Value
I started my Query:
let
FilePath = fnGetParameter("FAM Depreciation File Path"),
Source = Csv.Document(File.Contents(FilePath),[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"JE Line Internal ID", Int64.Type}, {"FAM Internal ID", Int64.Type}, {"Asset", type text}, {"Asset Type", type text}, {"Subsidiary", type text}, {"Transaction Amount", type number}, {"Depreciation Posting Reference", type text}, {"Date Created", type datetime}, {"Depreciation Date", type date}, {"Depreciation Account", type text}, {"Period", type date}})
in
#"Changed Type"
And I get this error:
DataSource.Error: Could not find file 'Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Depreciation tie to GL YTD 06-17'.
Details:
Z:\Department - ACCOUNTING\SEC Reporting\2017Q2\Reports\FAM Depreciation tie to GL YTD 06-17
Thanks for looking at this!
Rudi