Forum Discussion

I_NeedMorePower's avatar
I_NeedMorePower
Icon for Helper III rankHelper III
3 years ago
Solved

D365 FO: How To Filter Ledger Journal Entries Based on Cost Center Financial Dimension?

Greetings dears! I have a Power BI report that reads data from D365 FO that shows the ledger journal entries, but I want to display the journal entries for a specific cost centers. In the transacti...
  • I_NeedMorePower's avatar
    3 years ago

    Greetings,

     

    I have found the solution to do that and I want to share it with anybody who will face the same requirement 🙂

    First, I had to do a custom Data entity on the development environment of D365.

    The root of the query for the data entity is the GeneralJournalAccountEntry Table.

    This table contains all the ledger lines and it has a "LedgerDimension" field for the posted trans line.

    Instead of doing a join for all the dimension tables, you will include a "method field" into the data entity, and you do the query to retrieve the dimension you need that is associated with transaction lines for the root table of your query in the code of the method that will be assigned for the method field (Create a method and write down your query to retrieve the dimension value you need based on the ledger dimension of the GeneralJournalAccountEntry table in your root query).

    I found that this is faster then doing table joins on the query itself.

    Give a name to the method field for example in my case, I will name it CostCenter (because I want to use this field to filter based on cost centers).

    Now you can call this data entity on your Power BI and you will have your transactions with the dimension value displayed on it's new column created by you in the method field on the development environment 🙂