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 :
Customer experience | Sales, Customer Insights,...
Answered

Segment query consolidated data with SUM

(0) ShareShare
ReportReport
Posted on by 20

Hello! 

I'm trying to get a segment using consolidated data into the query, a typical example would be:

"Get all main contacts from accounts which the sum of all estimated import of related opportunities in a period is more than XX"

How we can achieve this query/result segment on Dynamics Marketing 365? Is it possible? I've read into documentation the use of SUM function but I wasn't able to use it in a proper way.

Thank you for help.

I have the same question (0)
  • Verified answer
    Petit Hibou Profile Picture
    on at

    Hi Oscar,

    it looks like the case you've described is not relevant for using SUM. The segment you want to build is related to a profile based query,while SUM can be used only in interaction queries, as aggregation function.

    Your goal might be achieved on CRM side as a new calculated field on the account entity, summing all opportunities, and simple attribute filter, on segmentation, after. It will be limited however by the fact that extra attribute will have to have hardcoded “period” part of the query.

    HTH

    Elena

  • Oscar Maqueira Escudero Profile Picture
    20 on at

    Thank you, I suppose that into oficial documentation it will be use for TRAVERSE:

    SUM

    An expression that can be called on the result of TRAVERSE or inside HAVING expression, for grouping conditional expression.

    Syntax SUM(propertyName)

    docs.microsoft.com/.../segment-query-definition

  • Verified answer
    Petit Hibou Profile Picture
    on at

    Hi Oscar,

    HAVING is exactly about interactions that I've written about. Using SUM with Traverse looks a bit odd for me. I guess, I need to ask my colleagues to review and verify this document.

    A small addition to my previous answer: "hardcoded part" may be resolved by using a custom attribute which can be updated using any means outside of Marketing – e.g. CRM workflows, plugins or some other jobs that would update data in CDS.

    Br

    Elena

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 214 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 76

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans