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

Entity view with duplicate sub views

(1) ShareShare
ReportReport
Posted on by 3,335
Hi
 
We are encountering a problem with the entity FinancialDimensionValues. On database there is an error while selecting data: "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."
 
The reason comes with the sub view FinancialDimensionValueEntityExistingListView. Looking on the SQL create script we see several entries for the same Dim View:
..
UNION ALL
SELECT T.NAME
FROM DimAttributeInventTable T
WHERE T2.VIEWNAME = 'DimAttributeInventTable'
AND T.RECID = T1.ENTITYINSTANCE
..
We could not find extensions on the objects. Deleting the view and full sync does create it with the same structure.
The view seems to be generated with all the sub views in a process. Which finance process could that be?
 
Thanks for any help.
  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,820 Super User 2026 Season 2 on at
    The SQL view is trying to pull multiple entries for the same dimension value. This happens if, in one of the dimension attribute views (like DimAttributeInventTable), there are multiple records for the same entity instance.
     
    • Check for Duplicate Dimension Records: Look in DimAttributeInventTable and other dimension tables (e.g., DimAttributeMainAccount, etc.) for any duplicate records based on the ENTITYINSTANCE field. Cleaning up these records may resolve the issue.

    • Verify Active Dimensions Configuration: Ensure that your active dimension settings do not have overlapping or duplicate dimensions that could cause conflicts in the view generation.

    • Re-run Full Synchronization: Even though you’ve deleted and re-synced the view, try re-running a full synchronization specifically targeting dimensions, as it can help refresh the entire dimension framework, including any dependent views.

    •  

    • if it’s not visible as an extension, may be affecting the generated SQL view behavior.

  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,820 Super User 2026 Season 2 on at

    Duplicate Entries Due to UNION ALL:

    • UNION ALL is used to combine the results of multiple SELECT statements without removing duplicates. If there are multiple SELECT statements targeting the same source (e.g., DimAttributeInventTable) and they’re not sufficiently filtered, it can lead to duplicates.

    Consider Using DISTINCT:

    • Alternatively, you could add a DISTINCT keyword in the main SELECT clause of FinancialDimensionValueEntityExistingListView. This can help filter out duplicates without needing to modify each UNION ALL block individually, though it might affect performance depending on the data volume.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 426 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 358

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 353 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans