Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

SQL Required - Trial Balance Report

(0) ShareShare
ReportReport
Posted on by 10

Hi 

We are using Alteryx (analytical tool) to connect to a copy of the prod DB in datalake. 

I want to extract the trial balance report from Alteryx. We are unable to figure out the various columns in the hundreds of tables in the DB. We are not quite sure about the SQL query behind the trial balance report

Could you please provide the SQL query behind the trial balance report ?

Thank you for your help

Regardspastedimage1673927744521v1.png

CT

  • GS-29062012-0 Profile Picture
    on at
    SQL Required - Trial Balance Report
    Hi @cterrence,
     
    did you manage to get the sql query for the above table? Could you please share the query?
  • Cterrence Profile Picture
    10 on at
    RE: SQL Required - Trial Balance Report

    Hi

    Finally I have received the x++ query for some reason the query does not the relevant columns which the team uses

    The query does not call any the column given below

    Journal number

    Voucher

    Date

    Year closed

    Type

    Ledger account

    Account name

    Description

    Currency

    Amount in transaction currency

    Amount

    Amount in reporting currency

    Posting type

    Transaction type

  • Cterrence Profile Picture
    10 on at
    RE: SQL Required - Trial Balance Report

    Thanks for the reply Girish

    There are four tables

    DimensionAttributeValueCombination table

    DimensionFocusBalance table

    GeneralJournalAccountEntry table

    LedgerTrialBalanceTmp table

    But I don't know what calculations are done in the backend.

    Regards

    CT

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: SQL Required - Trial Balance Report

    As Andre mentioned its not direct SQL query. Its combination of tables.

    Refer to the form LedgerTrialBalanceListPage >> constructBalances(Method name) >> Inside this method they will be calling the calculateBalance method of LedgerTrailBalanceTmp table. Inside this method LedgerTrialBalanceDp class is called with parameters..

    You need to debug the code and find out the tables. One table I found was "DimensionFocusBalance".

    Thanks,

    Girish S.

  • Cterrence Profile Picture
    10 on at
    RE: SQL Required - Trial Balance Report

    Thank you for your reply Andre

    The DBA is trying to create a view in SQL so that I can retrieve the data from Alteryx. It is getting difficult to retrieve the code behind the report. I could not find the code

    We got some info here - learn.microsoft.com/.../trial-balance-report-ledgertrialbalance

  • André Arnaud de Calavon Profile Picture
    293,020 Super User 2025 Season 1 on at
    RE: SQL Required - Trial Balance Report

    Hi CT,

    There is not a direct SQL statement. The report is built using x++ coding which collects data in a temporary table which will be used for the trial balance. If you look at the coding, you may try to translate that to an SQL query.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,020 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,837 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans