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, ...
Suggested Answer

Need to filter Report data on basis of multiple ledger dimensions

(0) ShareShare
ReportReport
Posted on by

I need to develop a report where I need data with multiple dimensions.
 
 
Now if I try to get all data during the given period and then check the dimensions data to verify required dimension it will compromise performance. 
 
Please help how I can get data with multiple dimensions quickly and processed quickly.
 
The required dimensions are 
 Project
 Project Competency
 Business Unit
 Export Unit
Let me explain my problem in detail,with this query.This query is working  fine with single dimension(Like given in the result below).
 
select generalJournalEntry.AccountingDate, DimensionAttribute.Name,  DimensionAttributeLevelValue.DisplayValue , GENERALJOURNALENTRY.LEDGER,generalJournalAccountEntry.RECID, generalJournalAccountEntry.MAINACCOUNT, GeneralJournalEntry.SUBLEDGERVOUCHER, generalJournalAccountEntry.POSTINGTYPE, generalJournalEntry.ACCOUNTINGDATE,generalJournalAccountEntry.ReportingCurrencyAmount 
FROM generalJournalAccountEntry            
inner join  generalJournalEntry on generalJournalEntry.RecId = generalJournalAccountEntry.GeneralJournalEntry
inner join  dimensionAttributeValueCombination on DimensionAttributeValueCombination.RecId =  generalJournalAccountEntry.LedgerDimension            
inner join dimensionAttributeValueGroupCombination on DimensionAttributeValueGroupCombination.DimensionAttributeValueCombination = DimensionAttributeValueCombination.RecId
            inner join dimensionAttributeValueGroup on DimensionAttributeValueGroup.recid = DimensionAttributeValueGroupCombination.DimensionAttributeValueGroup
            inner join dimensionAttributeLevelValue  on DimensionAttributeLevelValue.DimensionAttributeValueGroup = DimensionAttributeValueGroup.RecId
             inner join dimensionAttributeValue on DimensionAttributeLevelValue.DimensionAttributeValue = DimensionAttributeValue.RecId
            inner join dimensionAttribute on DimensionAttribute.recid = DimensionAttributeValue.DimensionAttribute
             where    GENERALJOURNALENTRY.LEDGER=5637145326 and   DimensionAttribute.Name in ('Project')
and GENERALJOURNALENTRY.ACCOUNTINGDATE between '2022/01/01' and '2022/01/01'
 order by GeneralJournalEntry.SUBLEDGERVOUCHER
 
Result (this is the result with one dimention which is project, this data is correct).But when we are working with multiple dimensions like in the second query it returns separte rec for each dimension and  we need to process data horizantally,which requires a lot of time to process.
 
AccountingDate    Name    DisplayValue    LEDGER    RECID    MAINACCOUNT    SUBLEDGERVOUCHER    POSTINGTYPE    ACCOUNTINGDATE    ReportingCurrencyAmount
2022-01-01 00:00:00.000    Project    501-001    5637145326    5642727628    5637144823    FTV-000558    126    2022-01-01 00:00:00.000    558.500000
2022-01-01 00:00:00.000    Project    115-017    5637145326    5642741908    5637144714    FTV-000559    126    2022-01-01 00:00:00.000    9437.000000
2022-01-01 00:00:00.000    Project    267-002    5637145326    5642889170    5637144823    FTV-000565    126    2022-01-01 00:00:00.000    385.000000
 
query2
  select generalJournalEntry.AccountingDate, DimensionAttribute.Name,  DimensionAttributeLevelValue.DisplayValue , GENERALJOURNALENTRY.LEDGER,generalJournalAccountEntry.RECID, generalJournalAccountEntry.MAINACCOUNT, GeneralJournalEntry.SUBLEDGERVOUCHER, generalJournalAccountEntry.POSTINGTYPE, generalJournalEntry.ACCOUNTINGDATE,generalJournalAccountEntry.ReportingCurrencyAmount FROM generalJournalAccountEntry            inner join  generalJournalEntry on generalJournalEntry.RecId = generalJournalAccountEntry.GeneralJournalEntry
  inner join  dimensionAttributeValueCombination on DimensionAttributeValueCombination.RecId =  generalJournalAccountEntry.LedgerDimension            
  inner join dimensionAttributeValueGroupCombination on DimensionAttributeValueGroupCombination.DimensionAttributeValueCombination = DimensionAttributeValueCombination.RecId            
  inner join dimensionAttributeValueGroup on DimensionAttributeValueGroup.recid = DimensionAttributeValueGroupCombination.DimensionAttributeValueGroup            
  inner join dimensionAttributeLevelValue  on DimensionAttributeLevelValue.DimensionAttributeValueGroup = DimensionAttributeValueGroup.RecId             
  inner join dimensionAttributeValue on DimensionAttributeLevelValue.DimensionAttributeValue = DimensionAttributeValue.RecId            
  inner join dimensionAttribute on DimensionAttribute.recid = DimensionAttributeValue.DimensionAttribute             
  where    GENERALJOURNALENTRY.LEDGER=5637145326 and   DimensionAttribute.Name in ('Project','ProjectCompetency')
  and GENERALJOURNALENTRY.ACCOUNTINGDATE between '2022/01/01' and '2022/01/01' 
  order by GeneralJournalEntry.SUBLEDGERVOUCHER
Result:
Result (this is the result with two dimention which is project and ProjectCompetency, this data is not correct, and data going to duplicate here)
AccountingDate    Name    DisplayValue                LEDGER    RECID    MAINACCOUNT    SUBLEDGERVOUCHER    POSTINGTYPE    ACCOUNTINGDATE    ReportingCurrencyAmount
2022-01-01 00:00:00.000    Project                    501-001   5637145326    5642727628    5637144823    FTV-000558    126    2022-01-01 00:00:00.000    558.500000
2022-01-01 00:00:00.000    ProjectCompetency    C12      5637145326    5642727628    5637144823    FTV-000558    126    2022-01-01 00:00:00.000    558.500000
2022-01-01 00:00:00.000    Project                    115-017   5637145326    5642741908    5637144714    FTV-000559    126    2022-01-01 00:00:00.000    9437.000000
2022-01-01 00:00:00.000    ProjectCompetency    C11      5637145326    5642741908    5637144714    FTV-000559    126    2022-01-01 00:00:00.000    9437.000000
2022-01-01 00:00:00.000    ProjectCompetency    C16      5637145326    5642889170    5637144823    FTV-000565    126    2022-01-01 00:00:00.000    385.000000
2022-01-01 00:00:00.000    Project                    267-002   5637145326    5642889170    5637144823    FTV-000565    126    2022-01-01 00:00:00.000    385.000000a
 
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,782 Most Valuable Professional on at
    Moved from D365 general forum to the Finance forum.
     
    I'm not sure what your problem is. If you dislike the fact that you get a separate line for each dimension value, I see two options:
    1. You use a matrix control in your report (SSRS or Power BI) to represent dimensions as columns).
    2. You'll use a different query (e.g. with a computed column for each dimension).

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 514 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 390

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans