web
You’re offline. This is a read only version of the page.
close
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

Select query for creating Pivot table

(1) ShareShare
ReportReport
Posted on by 395
Hello guys,
 
When I have table, lets say we named it TableA that contain these kind of records :
DepartmentTransdateStatusErrorAmount
HQ1/1/2022PostedNo10
HQ1/1/2022PostedError10
HQ1/1/2022NotPostedError10
HQ1/2/2022NotPostedNo10
HQ1/2/2022PostedNo10
BS1/1/2022PostedNo10
BS1/2/2022NotPostedError10
 
And I want to create a pivot table, and because it will be for a report, so I gonna need to insert the pivot table in another table, may I know how to do it, with X++ ?
I have to admit, I'm clueless what I'm gonna do about that record and what's needed to accomplish this in X++ select query.
 
So, the pivot will be like this:
 
DepartmentTransdateStatus: PostedStatus: Not PostedError
  Count AmountCountAmountCount 
HQ1/1/2022220110220
HQ 1/2/202211011000
BS1/1/202211000110
 
Basically, it will to capture and summarize, per Department and dates about :
1. How many are Posted and the amount
2. How many are Not Posted and amount
3. How many are Errors (provided it is posted or not), and the amount
 
Can someone help me ?
 
Thanks in advance.
 
I have the same question (0)
  • Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi Teevo,
     
    Can you re-write the tables. I got lost alittle in the first table as there is a field value 'No' but there is no column for it
     
    Also the 2nd table, the labels are close to each other. So if you can please maybe take screenshots from excel (it might be better)
     
    Also what is countAmountCount, how was this filled?
     
    And I didn't understand the question, what do u want to do in x++?
  • AR-01121610-0 Profile Picture
    4,967 Moderator on at
    Hy,
    as the F&O is mostly transcational oriented I would not do this within the ERP instead use any external tool like Excel or PowerBI for this kind of analyze.
     
     
  • MuthukumaranAX Profile Picture
    2,903 on at
    do you want to summarize the data and insert into table or show in report? 
    how do you want to execute the summarization on this table by user action or through periodic job?
  • Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    Can you provide more information (such as business logic or what you want to achieve) to help us solve the problem better? At this time, the information you have provided is not sufficient to support us in proposing a solution.
    Best regards,
    Kevin
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi Teevo,
     
    Do you want to show those fields on SSRS report? OR Power BI report? Can you give us more details?
     
     
    Thanks
    Waed Ayyad

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans