Skip to main content

Notifications

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 8,258 Super User 2025 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?
 
 
 
  • Bharani Preetham Peraka Profile Picture
    3,624 Moderator on at
    Data entity (Non exist join)
    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.
  • Suggested answer
    Umesh Pandit Profile Picture
    9,303 User Group Leader on at
    Data entity (Non exist join)
    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.
  • André Arnaud de Calavon Profile Picture
    294,127 Super User 2025 Season 1 on at
    Data entity (Non exist join)
    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?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,127 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans