web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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

  • André Arnaud de Calavon Profile Picture
    308,284 Super User 2026 Season 2 on at

    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.

  • Cterrence Profile Picture
    10 on at

    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

  • GirishS Profile Picture
    27,845 Moderator on at

    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

    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

  • Cterrence Profile Picture
    10 on at

    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

  • GS-29062012-0 Profile Picture
    on at
    Hi @cterrence,
     
    did you manage to get the sql query for the above table? Could you please share the 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 239 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 221

#3
Subra Profile Picture

Subra 166 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans