Precise Business Solutions

Epicor Financial Reporting Solution


Table of Contents

  1. Introduction
  2. Definitions
  3. The Solution
  1. Financial Category Master Data
  2. Financial Statement Definitions
  3. API Setup
  4. API Connectivity
  5. API's
  6. Power BI
  7. Downloads


Introduction

Purpose

The purpose of this document is to:

  • document the Precice Epicor Financial Reporting (PEFR) solution as it stands to date (version 2024.1); and
  • outline the proposed enhancements that make up the next version (2025.1) as well as any other future enhancements on the roadmap.




Definitions

Business Intelligence Definitions

Dashboard

As it pertains to computer information systems, a dashboard is a type of graphical user interface which often provides at-a-glance views of data relevant to a particular objective or process through a combination of visualizations and summary information. The dashboard is often accessible by a web browser and is typically linked to regularly updating data sources. Dashboards are often interactive and facilitate users to explore the data themselves, usually by clicking into elements to view more detailed information.

As it pertains to us, a dashboard contains a collection of one or more widgets set on the canvas (the physical area on the dashboard), for the purpose of providing inght throug data visualisation.

~ Wikipedia

KPI

KPI stands for key performance indicator, a quantifiable measure of performance over time for a specific objective. KPIs provide targets for teams to shoot for, milestones to gauge progress, and insights that help people across the organization make better decisions.

Metric

Metrics are measures of quantitative assessment commonly used for assessing, comparing, and tracking performance or production. Generally, a group of metrics will typically be used to build a dashboard that management or analysts review on a regular basis to maintain performance assessments, opinions, and business strategies.




The Solution

Power BI Financial Analytics for Epicor Kinetic
"Transforming Financial Reporting for Smarter Business Decisions"

Struggling with manual financial reporting in Excel? Power BI Financial Analytics for Epicor Kinetic by Precise Business Solutions empowers finance teams with fast, interactive dashboards that bring your financial data to life.

Say goodbye to cumbersome spreadsheets and hello to real-time insights with Profit & Loss, Balance Sheet, and Cashflow Statements, as well as Debtor and Creditor Aging reports—all accessible through a powerful and user-friendly interface.

The Precice Epicor Financial Reporting (PEFR) solution is a light weight, rapid deployment, fit for purpose financial reporting solution.

Providing immediate General Ledger visibility, the Precice Epicor Financial Reporting (PEFR) solution is built to give immediate insight into your account balances.

Furthermore, our current solution architecture makes reporting equally as easy within Epicor's native dashboard/EDD environment as it does using external reporting tools such as Power BI, connecting to the API's.

Why Choose Power BI Financial Analytics?

  • Built for Efficiency: Dramatically reduce time spent on financial reporting with seamless integration to Epicor.
  • Intuitive Dashboards: Visualize your General Ledger and budgets with interactive, customizable views.
  • Cost-Effective: A low-cost, high-value solution designed to simplify your reporting processes.
  • Powered by Power BI: Leverage the market-leading analytics platform to connect and analyse data effortlessly.

Key Benefits at a Glance

  • Save Time and Reduce Errors: Streamline your processes and minimize manual data manipulation.
  • Data Visibility Across Dimensions: Intuitively slice and dice data by segment, company, or book.
  • Leverage Existing Skills: Built on Power BI, a tool many finance teams already know and trust.

Who is it For?

Designed for finance professionals using Epicor, from CFOs to accountants, who seek greater financial visibility without the complexity of building reports from scratch.

Security

Security You Can Trust

Powered by Microsoft Power BI, the solution incorporates world-class security measures:

  • Data encryption at rest and in transit.
  • Role-based access control (RBAC) and row-level security.
  • Compliance with global standards such as GDPR, HIPAA, and SOC certifications.

Solution Architecture

At the heart of the Precice Epicor Financial Reporting (PEFR) solution are a set of BAQ's modelling Epicor tables into a neat, intuitive Star Schema of the necesary Dimensions and Fact Tables.

These BAQ's can be queried directly from within Epicor/EDD to effortlessly produce dashboards and reports.

And should your organisation wish to query the same data in an external reporting tool such as Power BI, it can access the very same BAQ data via Epicor's API's.

Over and above this flexible data solution, our offering comes bundled with a Power BI report template showing how to connect to the API's along with a series of reports showcasing the standard financial reports achievable.

Roadmap

[version 2024.1] Current Version

Currently, we can produce:

for period balances and movements, as appropriate.

And slice data across the following attributes:

  • Company
  • Book
  • Fiscal Year
  • Fiscal Period
  • GL Account Segment; and
  • Natural Account Class.

[version 2025.1] February 2025 Release

We are propsing to add:

slicable across all the same dimension attributes the Income Statement and Balance Sheet are.

Further to this, want to produce:

reports.

Inclusions

  • BAQ's - The necessary BAQ's will be imported into your Epicor instance.
  • API URL's - The requisite API URL's will be provided.
  • Power BI Report - A Power BI report (.pbix file) will be provided.
  • Documentation - Full documentation covering all necessary aspects of the solution will be provided.

Exclusions

  • Power BI Licences - Power BI licencing needs to be organised by the organisation's IT department.
  • Power BI Development - Power BI development beyond the 8 hours bundled with the solution to provide for configuration and minor tweaks needs to be bourne by the recipient organisation or by separate engagement of Precise.

Version Compatibility

VersionRelease DateCompatabilityNotes
version 2025.1February 2025Up to 2024.2Cashflow, aged debtor & creditor capability.
   
version 2024.1September 2024Up to 2024.2Profit & Loss and Balance Sheet capability.

FAQ's

What if our organisation doesn't use Power BI?

No problem. This solution is a data solution and ultimately technology agnostic. Virtually all modern reporting products have the ability to connect to API's, meaning our solution is truely versatile.

If we upgrade Epicor, will the solution break?

No. The solution to date is backwards compatable. And in the event the Epicor data structure changes significantly enough to impact the solution, we will provide/make available updated BAQ's to ensure your reporting solution continues uninterupted.




Financial Category Master Data

Setting up your fincancial category master data correctly is crucial for good financial reporting.

The following Account Classification hierarchy aims to be an exhausive, albeit extensible, intuitive set of classifications that map nicely to the financial statements defined in the following section.

Note: the below list needs to be validated by our finance consultants for competeness and fitness for purpose.
  • [SALES]Sales
  • [COGS]COGS
  • [OPS_INC]Income from Operations
  • [OPS_EXP]Expenses from Operations
  • [INC]Income
  • [INC_INT]Interest Income
  • [INC_OTH]Income Other
  • [INC_ICRCHG]Income InterCompany / Recharge
  • [EXP]Expenses
  • [EXP_E]Employee Remuneration
  • [EXP_S]Expense Supplier
  • [EXP_PLDA]Profit Loss Disposal Assets
  • [EXP_BC]Borrowing Costs
  • [EXP_ICRCHG]Expense InterCo / Recharge
  • [EXP_ADMIN]Administration Expenses
  • [EXP_DA]Depreciation Amortisation
  • [EXP_INT]Interest Expense
  • [EXP_FX]Foreign Currency Gain / Loss
  • [EXP_FX_R]FX Gain Loss Realised
  • [EXP_FX_U]FX Gain Loss Unrealised
  • [EXP_OTH]Expenses Other
  • [EXP_TAX]Tax Expense
  • [CA]Current Assets
  • [CA_CCE]Cash & Cash Equivalent
  • [CA_CCE_BK]Cash at Bank
  • [CA_CCE_PC]Petty Cash
  • [CA_CCE_TD]Term Deposits
  • [CA_RCVBL]Receivables
  • [CA_STOCK]Inventory
  • [CA_GST]GST Clearing Acct
  • [CA_GST_PD]GST Paid
  • [CA_GST_COL]GST Collected
  • [CA_PREP]Prepayments
  • [CA_OTH]Current Assets Other
  • [NCA]Non-Current Assets
  • [NCA_LB]Land and Buildings
  • [NCA_PPE]Property Plant and Equipment
  • [NCA_PPEAD]PPE Accumulated Depn
  • [NCA_INVEST]Investments NCA
  • [NCA_OTH]Non Current Assets Other
  • [NCA_INTG]Intangibles
  • [CL]Current Liabilities
  • [CL_CASH]Curr Liab Cash & Cash Equiv
  • [CL_OD]OverDraft
  • [CL_PROV]Provisions Current
  • [CL_PROV_E]Provn Employees
  • [CL_PROV_O]Provision Other
  • [CL_PYBLE]Payables
  • [CL_ACC]Accruals
  • [CL_ACC_E]Accrue Employee Remuneration
  • [CL_ACC_S]Accruals Suppliers
  • [CL_IB]IBL CL
  • [CL_RAD]Accomm RADS, Bonds
  • [CL_OTH]Current Liabilitites Other
  • [CL_VO]Village Obligations
  • [NCL]Non-Current Liabilities
  • [NCL_L]Non Current Loans
  • [NCL_OTH]Non Current Liabilities Other
  • [NCL_PROV]Provisions NCL
  • [NCL_PROV_E]Provisions Employees NCL
  • [NCL_PROV_O]Provisions Other NCL
  • [NCL_IBL]IBL NCL
  • [EQ]Equity
  • [EQ_AF]Accumulated Funds
  • [EQ_RES]Reserves
  • [EQ_RE]Retained Earnings
  • [EQ_RE_CY]Current Earnings CY
  • [EQ_RE_PY]Retained Earnings PY
  • [EQ_EQ]Suspense



Financial Statement Definitions

Income Statement

  • Sales [SALES]
  • COGS [COGS]
  • Gross Profit from Sales
  • Income from Operations [OPS_INC]
  • Expenses from Operations [OPS_EXP]
  • Net Income from Operations
  • Income [INC]
  • Interest Income [INC_INT]
  • Income Other [INC_OTH]
  • Income InterCompany / Recharge [INC_ICRCHG]
  • Total Income
  • Expenses [EXP]
  • Employee Remuneration [EXP_E]
  • Expense Supplier [EXP_S]
  • Profit Loss Disposal Assets [EXP_PLDA]
  • Borrowing Costs [EXP_BC]
  • Expense InterCo / Recharge [EXP_ICRCHG]
  • Administration Expenses [EXP_ADMIN]
  • Depreciation Amortisation [EXP_DA]
  • Interest Expense [EXP_INT]
  • Foreign Currency Gain / Loss [EXP_FX]
  • FX Gain Loss Realised [EXP_FX_R]
  • FX Gain Loss Unrealised [EXP_FX_U]
  • Expenses Other [EXP_OTH]
  • Tax Expense [EXP_TAX]
  • Total Expenses
  • Net Profit [*NP*]

Balance Sheet

  • Current Assets [CA]
  • Cash & Cash Equivalent [CA_CCE]
  • Cash at Bank [CA_CCE_BK]
  • Petty Cash [CA_CCE_PC]
  • Term Deposits [CA_CCE_TD]
  • Total Cash & Cash Equivalent
  • Receivables [CA_RCVBL]
  • Inventory [CA_STOCK]
  • GST Clearing Acct [CA_GST]
  • GST Paid [CA_GST_PD]
  • GST Collected [CA_GST_COL]
  • Total GST Clearing Acct
  • Prepayments [CA_PREP]
  • Current Assets Other [CA_OTH]
  • Total Current Assets
  • Non-Current Assets [NCA]
  • Land and Buildings [NCA_LB]
  • Property Plant and Equipment [NCA_PPE]
  • PPE Accumulated Depn [NCA_PPEAD]
  • Investments NCA [NCA_INVEST]
  • Non Current Assets Other [NCA_OTH]
  • Intangibles [NCA_INTG]
  • Total Non-Current Assets
  • Total Assets
  • Current Liabilities [CL]
  • Curr Liab Cash & Cash Equiv [CL_CASH]
  • OverDraft [CL_OD]
  • Provisions Current [CL_PROV]
  • Provn Employees [CL_PROV_E]
  • Provision Other [CL_PROV_O]
  • Total Provisions Current
  • Payables [CL_PYBLE]
  • Accruals [CL_ACC]
  • Accrue Employee Remuneration [CL_ACC_E]
  • Accruals Suppliers [CL_ACC_S]
  • Total Accruals
  • IBL CL [CL_IB]
  • Accomm RADS, Bonds [CL_RAD]
  • Current Liabilitites Other [CL_OTH]
  • Village Obligations [CL_VO]
  • Total Current Liabilities
  • Non-Current Liabilities [NCL]
  • Non Current Loans [NCL_L]
  • Non Current Liabilities Other [NCL_OTH]
  • Provisions NCL [NCL_PROV]
  • Provisions Employees NCL [NCL_PROV_E]
  • Provisions Other NCL [NCL_PROV_O]
  • Total Provisions NCL
  • IBL NCL [NCL_IBL]
  • Total Non-Current Liabilities
  • Total Liabilities
  • Net Assets
  • Equity [EQ]
  • Accumulated Funds [EQ_AF]
  • Reserves [EQ_RES]
  • Retained Earnings [EQ_RE]
  • Current Earnings CY [EQ_RE_CY]
  • Retained Earnings PY [EQ_RE_PY]
  • Total Retained Earnings
  • Suspense [EQ_EQ]
  • Total Equity

Cashflow Statement (Indirect)

  • Cash Flow From Operations
  • Net Earnings [*NP*]
  • Additions to Cash
  • Depreciation [NCA_PPEAD]
  • Decrease in Accounts Recievable [CA_RCVBL]
  • Increase in Accounts Payable [CL_PYBLE]
  • Increase in Taxes Payable [...CL_PYBLE]
  • Total Additions to Cash
  • Subtractions From Cash
  • Increase in Inventory [<< TBA >>]
  • Total Subtractions From Cash
  • Net Cash From Operations
  • Cash Flow From Investing
  • Equipment [<< TBA >>]
  • Net Cash From Investing
  • Cash Flow From Financing
  • Notes Payable [<< TBA >>]
  • Net Cash From Financing
  • Net Cash Flow



API Setup

[Command Prompt] ping <IP Address>

ping 10.0.104.21

ping QAARM2024-JSM

ping QAARM2024-JSM/ARM8040

https://erparmsandpit.precise.local/Kinetic2022_2/api/v1/BaqSvc/edw_DimFiscalPeriod/




API Connectivity

Note: Enter domain into box below.
[KineticServer]/[KineticInstance]

eg: erparmsandpit.precise.local/Kinetic2022_2



Note: If the above URL's seem to resolve but no JSON data shows, right click on page and click view source'. If JSON data is surfaced your URL is correct.
Note: Even if the above URL's resolve and return data, if it is not an https connection Power BI will terminate the connection and return NULL.

See your IT department to ensure the security certificate is applied appropriately on the server.



API's

DimCustomer *** New Object ***


DimFiscalPeriod


DimGLAccount


DimGLBook


DimVendor *** New Object ***


FactGLJournalDetail


FactGLPeriodActual


FactGLPeriodBudget





Power BI

CallWebFeed

				
let
    Source = (Endpoint as text, Top as number, Skip as number) =>
    let
        Source = Json.Document(Web.Contents(
            "https://erparmsandpit.precise.local/Kinetic2022_2/api/v1/BaqSvc/",
            [
                RelativePath = Endpoint & "/" & "?$top=" & Number.ToText(Top) & "&$skip=" & Number.ToText(Skip)
            ]
        ))
    in
        Source
in
    Source
				

DimFiscalPeriod

				
let
    Source = let
    Buffer = 20,
    GetData = (Top, Skip) =>
        let
            Result = try CallWebFeed("edw_DimFiscalPeriod", Top, Skip) otherwise null,
            BufferedResult = Result
        in
            BufferedResult,
    GeneratedList = List.Generate(
        () => [Top = Buffer, Skip = 0, Result = GetData(Buffer, 0)],
        each not (List.IsEmpty([Result][value])),
        each [Top = [Top] + Buffer, Skip = [Skip] + Buffer, Result = GetData(Buffer, [Skip] + Buffer)],
        each [Result][value]
    )
in
    Table.FromList(List.Combine(GeneratedList), Splitter.SplitByNothing(), null, null, ExtraValues.Error),

    #"Expanded Column1" = Table.ExpandRecordColumn(
		Source, "Column1", 
		{
			"Calculated_FiscalPeriodKey", 
			"Calculated_FiscalYear", 
			"Calculated_FiscalQuarter", 
			"Calculated_FiscalPeriod", 
			"Calculated_FYStartDate", 
			"Calculated_FYEndDate", 
			"Calculated_FPEndDate", 
			"Calculated_FPStartDate", 
			"Calculated_FYPeriods"
		}, 
		{
			"_FiscalPeriodKey", 
			"FiscalYear", 
			"FiscalQuarter", 
			"FiscalPeriod", 
			"FYStartDate", 
			"FYEndDate", 
			"FPEndDate", 
			"FPStartDate", 
			"FiscalPeriods"
		}
	),

    #"Changed Type" = Table.TransformColumnTypes(
		#"Expanded Column1",
		{
			{"FiscalPeriod", Int64.Type}, 
			{"FYStartDate", type date}, 
			{"FYEndDate", type date}, 
			{"FPStartDate", type date}, 
			{"FPEndDate", type date}, 
			{"FiscalPeriods", Int64.Type}, 
			{"FiscalYear", type text}, 
			{"FiscalQuarter", type text}
		}
	)

in
    #"Changed Type"
	
				

DimGLAccount


let
    Source = let
    Buffer = 10000,
    GetData = (Top, Skip) =>
        let
            Result = try CallWebFeed("edw_DimGLAccount", Top, Skip) otherwise null,
            BufferedResult = Result
        in
            BufferedResult,
    GeneratedList = List.Generate(
        () => [Top = Buffer, Skip = 0, Result = GetData(Buffer, 0)],
        each not (List.IsEmpty([Result][value])),
        each [Top = [Top] + Buffer, Skip = [Skip] + Buffer, Result = GetData(Buffer, [Skip] + Buffer)],
        each [Result][value]
    )
in

    Table.FromList(List.Combine(GeneratedList), Splitter.SplitByNothing(), null, null, ExtraValues.Error),

    #"Expanded Column1" = Table.ExpandRecordColumn(
		Source, "Column1", 
		{
			"Calculated_GLAccountKey", 
			"Calculated_Company", 
			"Calculated_COACode", 
			"Calculated_GLAccount", 
			"Calculated_GLAccountDesc", 
			"Calculated_GLAccountAndDesc", 
			"Calculated_Type", 
			"Calculated_GLStatement", 
			"Calculated_GLCategoryDesc", 
			"Calculated_ParentGLCategoryID", 
			"Calculated_ParentGLCategoryDesc", 
			"Calculated_Segment1Name", 
			"Calculated_Segment1Value", 
			"Calculated_Segment1NameAndValue", 
			"Calculated_Segment2Name", 
			"Calculated_Segment2Value", 
			"Calculated_Segment2NameAndValue", 
			"Calculated_Segment3Name", 
			"Calculated_Segment3Value", 
			"Calculated_Segment3NameAndValue", 
			"Calculated_Segment4Name", 
			"Calculated_Segment4Value", 
			"Calculated_Segment4NameAndValue", 
			"Calculated_Segment5Name", 
			"Calculated_Segment5Value", 
			"Calculated_Segment5NameAndValue", 
			"Calculated_Segment1Category", 
			"Calculated_L1_GLCategoryID", 
			"Calculated_L1_GLCategoryDesc", 
			"Calculated_L1_GLCategoryDescAndID", 
			"Calculated_L1_GLCategoryOrder", 
			"Calculated_L2_GLCategoryID", 
			"Calculated_L2_GLCategoryDesc", 
			"Calculated_L2_GLCategoryDescAndID", 
			"Calculated_L2_GLCategoryOrder", 
			"Calculated_L3_GLCategoryID", 
			"Calculated_L3_GLCategoryDesc", 
			"Calculated_L3_GLCategoryDescAndID", 
			"Calculated_L3_GLCategoryOrder"
		}, 
		{
			"_GLAccountKey", 
			"Company", 
			"COACode", 
			"GLAccount", 
			"GLAccountDesc", 
			"GLAccountAndDesc", 
			"Type", 
			"GLStatement", 
			"GLCategoryDesc", 
			"ParentGLCategoryID", 
			"ParentGLCategoryDesc", 
			"Segment1Name", 
			"Segment1Value", 
			"Segment1NameAndValue", 
			"Segment2Name", 
			"Segment2Value", 
			"Segment2NameAndValue", 
			"Segment3Name", 
			"Segment3Value", 
			"Segment3NameAndValue", 
			"Segment4Name", 
			"Segment4Value", 
			"Segment4NameAndValue", 
			"Segment5Name", 
			"Segment5Value", 
			"Segment5NameAndValue", 
			"Segment1Category", 
			"L1_GLCategoryID", 
			"L1_GLCategoryDesc", 
			"L1_GLCategoryDescAndID", 
			"L1_GLCategoryOrder", 
			"L2_GLCategoryID", 
			"L2_GLCategoryDesc", 
			"L2_GLCategoryDescAndID", 
			"L2_GLCategoryOrder", 
			"L3_GLCategoryID", 
			"L3_GLCategoryDesc", 
			"L3_GLCategoryDescAndID", 
			"L3_GLCategoryOrder"
		}
	),

    #"Filtered Rows" = Table.SelectRows(#"Expanded Column1", each [Segment1Value] <> null and [Segment1Value] <> "")
in
    #"Filtered Rows"
	
				

DimGLBook

				

let
    Source = let
    Buffer = 200,
    GetData = (Top, Skip) =>
        let
            Result = try CallWebFeed("edw_DimGLBook", Top, Skip) otherwise null,
            BufferedResult = Result
        in
            BufferedResult,
    GeneratedList = List.Generate(
        () => [Top = Buffer, Skip = 0, Result = GetData(Buffer, 0)],
        each not (List.IsEmpty([Result][value])),
        each [Top = [Top] + Buffer, Skip = [Skip] + Buffer, Result = GetData(Buffer, [Skip] + Buffer)],
        each [Result][value]
    )
in
    //List.Combine(GeneratedList)
    Table.FromList(List.Combine(GeneratedList), Splitter.SplitByNothing(), null, null, ExtraValues.Error),


    #"Expanded Column1" = Table.ExpandRecordColumn(
		Source, "Column1", 
		{
			"Calculated_GLBookKey", 
			"Calculated_Company", 
			"Calculated_CompanyName", 
			"Calculated_CompanyAndName", 
			"Calculated_GLBookID", 
			"Calculated_GLBookDesc", 
			"Calculated_GLBookIDAndDesc", 
			"Calculated_GLBookIDAndDescAndCurrency", 
			"Calculated_IsMainGLBook", 
			"Calculated_GLBookType", 
			"Calculated_IsGLBookInactive", 
			"Calculated_COACode", 
			"Calculated_COADesc", 
			"Calculated_COASeparatorChar", 
			"Calculated_COAPerBalFmt", 
			"Calculated_COATBBalFmt", 
			"Calculated_CurrencyCode", 
			"Calculated_CurrencyDesc", 
			"Calculated_CurrencySymbol", 
			"Calculated_FiscalCalendarID", 
			"Calculated_FiscalCalendarDesc", 
			"Calculated_FiscalCalendarStartDate", 
			"Calculated_FiscalCalendarEndDate"
		}, 
		{
			"_GLBookKey", 
			"Company", 
			"CompanyName", 
			"CompanyAndName", 
			"GLBookID", 
			"GLBookDesc", 
			"GLBookIDAndDesc", 
			"GLBookIDAndDescAndCurrency", 
			"IsMainGLBook", 
			"GLBookType", 
			"IsGLBookInactive", 
			"COACode", 
			"COADesc", 
			"COASeparatorChar", 
			"COAPerBalFmt", 
			"COATBBalFmt", 
			"CurrencyCode", 
			"CurrencyDesc", 
			"CurrencySymbol", 
			"FiscalCalendarID", 
			"FiscalCalendarDesc", 
			"FiscalCalendarStartDate", 
			"FiscalCalendarEndDate"
		}
	),

    #"Changed Type" = Table.TransformColumnTypes(
		#"Expanded Column1",
		{
			{"FiscalCalendarStartDate", type date}, 
			{"FiscalCalendarEndDate", type date}, 
			{"Company", type text}, 
			{"CompanyName", type text}, 
			{"CompanyAndName", type text}, 
			{"GLBookID", type text}, 
			{"GLBookDesc", type text}, 
			{"GLBookIDAndDesc", type text}, 
			{"GLBookIDAndDescAndCurrency", type text}, 
			{"IsMainGLBook", type text}, 
			{"GLBookType", Int64.Type}, 
			{"COACode", type text}, 
			{"COADesc", type text}, 
			{"COASeparatorChar", type text}, 
			{"COAPerBalFmt", type text}, 
			{"CurrencyCode", type text}, 
			{"CurrencyDesc", type text}, 
			{"CurrencySymbol", type text}, 
			{"FiscalCalendarID", type text}, 
			{"FiscalCalendarDesc", type text}
		}
	)

in
    #"Changed Type"
	
				

FactGLPeriodActual

				
let
    Source = let
    Buffer = 10000,
    GetData = (Top, Skip) =>
        let
            Result = try CallWebFeed("edw_FactGLPeriodActual", Top, Skip) otherwise null,
            BufferedResult = Result
        in
            BufferedResult,
    GeneratedList = List.Generate(
        () => [Top = Buffer, Skip = 0, Result = GetData(Buffer, 0)],
        each not (List.IsEmpty([Result][value])),
        each [Top = [Top] + Buffer, Skip = [Skip] + Buffer, Result = GetData(Buffer, [Skip] + Buffer)],
        each [Result][value]
    )
in

    Table.FromList(List.Combine(GeneratedList), Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    
    #"Expanded Column1" = Table.ExpandRecordColumn(
        Source, 
        "Column1", 
        {
            "Calculated_GLAccountKey", 
            "Calculated_FiscalPeriodKey", 
            "Calculated_GLBookKey", 
            "GLPeriodBal_Company", 
            "GLPeriodBal_BookID", 
            "GLBook_COACode", 
            "GLPeriodBal_BalanceAcct", 
            "GLPeriodBal_BalanceType", 
            "GLPeriodBal_CarryForwardBalance", 
            "GLPeriodBal_OpenBalance", 
            "GLPeriodBal_BalanceAmt", 
            "GLPeriodBal_DebitAmt", 
            "GLPeriodBal_CreditAmt", 
            "GLPeriodBal_BalanceStatAmt", 
            "GLPeriodBal_DebitStatAmt", 
            "GLPeriodBal_CreditStatAmt", 
            "GLPeriodBal_OpenBalanceStatAmt", 
            "GLPeriodBal_CarryForwardBalanceStatAmt"
        }, 
        {
            "_GLAccountKey", 
            "_FiscalPeriodKey", 
            "_GLBookKey", 
            "Company", 
            "BookID", 
            "COACode", 
            "BalanceAcct", 
            "BalanceType", 
            "CarryForwardBalance", 
            "OpenBalance", 
            "Actual", 
            "ActualDr", 
            "ActualCr", 
            "BalanceStatAmt", 
            "DebitStatAmt", 
            "CreditStatAmt", 
            "OpenBalanceStatAmt", 
            "CarryForwardBalanceStatAmt"
        }
    ),
    
    #"Changed Type" = Table.TransformColumnTypes(
        #"Expanded Column1",
        {
            {"CarryForwardBalance", type number}, 
            {"OpenBalance", type number}, 
            {"Actual", type number}, 
            {"ActualDr", type number}, 
            {"ActualCr", type number}, 
            {"BalanceStatAmt", type number}, 
            {"DebitStatAmt", type number}, 
            {"CreditStatAmt", type number}, 
            {"OpenBalanceStatAmt", type number}, 
            {"CarryForwardBalanceStatAmt", type number}
        }
    )
in
    #"Changed Type"
	
				

FactGLPeriodBudget

				
let
    Source = let
    Buffer = 10000,
    GetData = (Top, Skip) =>
        let
            Result = try CallWebFeed("edw_FactGLPeriodBudget", Top, Skip) otherwise null,
            BufferedResult = Result
        in
            BufferedResult,
    GeneratedList = List.Generate(
        () => [Top = Buffer, Skip = 0, Result = GetData(Buffer, 0)],
        each not (List.IsEmpty([Result][value])),
        each [Top = [Top] + Buffer, Skip = [Skip] + Buffer, Result = GetData(Buffer, [Skip] + Buffer)],
        each [Result][value]
    )
in

    Table.FromList(List.Combine(GeneratedList), Splitter.SplitByNothing(), null, null, ExtraValues.Error),

    #"Expanded Column1" = Table.ExpandRecordColumn(
        Source, 
        "Column1", 
        {
            "Calculated_GLAccountKey", 
            "Calculated_FiscalPeriodKey", 
            "Calculated_GLBookKey", 
            "GLBudgetDtl_Company", 
            "GLBudgetDtl_BookID", 
            "GLBook_COACode", 
            "GLBudgetDtl_BalanceAcct", 
            "GLBudgetDtl_BalanceType", 
            "GLBudgetDtl_BudgetCodeID", 
            "GLBudgetDtl_BudgetAmt", 
            "GLBudgetDtl_BudgetStatAmt"
        }, 
        {
            "_GLAccountKey", 
            "_FiscalPeriodKey", 
            "_GLBookKey", 
            "Company", 
            "BookID", 
            "COACode", 
            "BalanceAcct", 
            "BalanceType", 
            "BudgetCodeID", 
            "Budget", 
            "BudgetStatAmt"
            }
        ),

    #"Changed Type" = Table.TransformColumnTypes(
        #"Expanded Column1",
        {
            {"Budget", type number}, 
            {"BudgetStatAmt", type number}
        }
    )

in
    #"Changed Type"
	
				



Downloads