Skip to main content

Notifications

Microsoft Dynamics AX forum
Unanswered

Gross Margin by Item (CustGrossMarginbyItem_NA) Report

Posted on by Microsoft Employee
So i have made some changes to the report and the Gross Margin by Item looks something like this now : 
Inline image 1
However, my concern is that Sales Balance - Source Currency is showing different values for the same Sales Balance - Reporting Currency.
I have created relations between CustInvoiceTrans and CustGrossMarginbyItem_NA based on Invoice Id, so ideally it should work.
Not sure what i might be missing out on.
Suggestions / Pointers?
  • Martin Dráb Profile Picture
    Martin Dráb 227,979 Super User 2024 Season 2 on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    What's the source of those fields?

    And what if you run the query directly (such as in a job or DEV_QueryBrowser) and check field values? It would be easier to debug than if you put a report between you and the query.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    :) I am doing a dry run already. Will share the results, in case i run into something significant. Thanks :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    Oh Sorry! Didn't realize that.

    Anyway, i have posted another picture of the same to which you should have access. :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    I am in middle of conf call - so most definitely would not be able to look at the code/AOT. But if you can do one thing for me that would be wonderful - can you look at the tables and do basic dry run to see if it is picking the correct records from teh Cust Invoice Trans table?

    Otherwise, you have martin on the thread and he and I actually mean it is the "Guru of AX " :)

  • Martin Dráb Profile Picture
    Martin Dráb 227,979 Super User 2024 Season 2 on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    We don't see the original image because you inadvertently linked it from your email account (and we obviously don't have access there).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    I didn't really modify any code per say. I just added CustInvoiceTrans as the child data set of CustGrossMarginbyItem_NA.

    I created a relation between the two based on InvoiceId.

    Also, the Dynamic Property of the Fields is set to 'Yes'.

    So, i selected the 'Line Amount' field from the CustInvoiceTrans table and that is the one displayed as Sales Balance - Source Currency.

    Also, i have modified the 'Sales Balance' on the original report to appear as 'Sales Balance - Reporting Currency' (only Label modification)

    That is pretty much it.

    As per my understanding the values should be the same for Sales Balance - Source Currency same Sales Balance - Reporting Currency.

    Isn't it?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    Okay - better now. Can you share the piece of code that you modified?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    Oh is it? It is an embedded image not a link.

    I am going to post it again here :

    Gross-margin-by-item.jpg

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Gross Margin by Item (CustGrossMarginbyItem_NA) Report

    Hi Nidhi,

    I would like to help - but your image link seems to be broken.

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,142 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,979 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans