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

Data entity (Non exist join)

(1) ShareShare
ReportReport
Posted on by 9,039 Super User 2025 Season 2
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
    301,075 Super User 2025 Season 2 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

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 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans