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

Data entity (Non exist join)

(1) ShareShare
ReportReport
Posted on by 9,103 Super User 2026 Season 1
Hi All,
 
I am trying to achieve this query

{SELECT FIRSTFAST * FROM DimAttributeOMCostCenter(ds) ORDER BY DimAttributeOMCostCenter.Value ASC NOTEXISTS JOIN 'x' FROM DimensionAttributeValueLedgerView(DimensionAttributeValueLedgerView_1) WHERE DimAttributeOMCostCenter.Key = DimensionAttributeValueLedgerView.EntityInstance  /
 
using Data entity. How can I achieve this? I tried it but when I see the design from sql it is return this:
 
/SELECT   T1.RECID AS KEY_, T1.OMOPERATINGUNITNUMBER AS VALUE, T1.PARTITION, T1.RECID, T2.NAME, T2.PARTITION AS PARTITION#2
FROM     dbo.DIRPARTYTABLE AS T1 INNER JOIN
             dbo.DIRPARTYTABLE AS T2 ON T1.RECID = T2.RECID AND T1.PARTITION = T2.PARTITION
WHERE   (T1.OMOPERATINGUNITTYPE = 2) AND (NOT EXISTS
                 (SELECT   TOP (1) ' x ' AS Expr1
                 FROM     dbo.DIMENSIONATTRIBUTEVALUELEDGERVIEW AS T3
                 WHERE   (ISSUSPENDED = 1) AND (T1.RECID = ENTITYINSTANCE) AND (T1.PARTITION = PARTITION))) AND (T1.INSTANCERELATIONTYPE IN (10781))/
 
 
Any hint?
 
 
 
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,159 Super User 2026 Season 1 on at
    Hi Waed,
     
    Can you explain functionally what you want to achieve? Is this query the data entity query itself or would you need this for a calculated field? What exact output are you expectting and what is the current behavior?
  • Suggested answer
    Umesh Pandit Profile Picture
    9,315 User Group Leader on at
    Your initial query is a bit complex due to the NOTEXISTS JOIN and the aliasing of the joined table. To achieve this using a Data Entity, you'll need to follow the standard patterns for creating queries in Data Entities.

    In this case, you would create a custom Data Entity based on the table DimAttributeOMCostCenter and then add a data source that joins with the DimensionAttributeValueLedgerView based on your conditions.
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    You need a data entity same like the first query. So You can simply create a data entity with those datasources and join them as per relation. If data entity is showing different as shown in the 2nd select query, then can you tell us why Dirpartytable is added? Also, we can give more information if you give us more details about the data entity how it is built.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 681

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 202 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans