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

Use of custom calculated field in Goal Rollup Query

(2) ShareShare
ReportReport
Posted on by 93
Hi All,
 
I have scenario where I have had to calculate the actual qty of an order line depending on the description of the product.
 
For example if my order have three lines and each line has a qty of 2:
  • If the product description contains ‘one unit’ my Calculated Qty is the line Qty * 1 = 2
  • If the product description contains ‘two units’ my Calculated Qty is the line Qty * 2 = 4
  • If the product description contains ‘six units’ my Calculated Qty is the line Qty * 6 = 12
This issue I have is that I would then like to use this ‘Calculated Qty’ in my Goal Rollup Query, so that when the goal is looking for the total qty for these three lines, it it returning 18 and not the actual qty of 6.
Can this be done?
I have the same question (0)
  • Vahid Ghafarpour Profile Picture
    12,220 Super User 2026 Season 1 on at
  • Suggested answer
    Muhammad.Affan Profile Picture
    Moderator on at
  • MichaelTorres Profile Picture
    86 on at
    Hi there,
     
    You’ll need to create a custom-calculated field in Dynamics 365. Navigate to the customizations area in Dynamics 365. Create a new field for your order line entity and set it as a calculated field.
     
    In the field’s properties, use a formula to evaluate the product description. You can use conditional logic (like an IF statement) to set the calculated quantity based on whether the description contains one unit, two units, or six units
     
    Once your custom-calculated field is set up, you can incorporate it into your goal rollup query. This way, when the query runs, it will use the calculated quantity instead of the actual quantity, giving you the desired total
     
    Hope it will help
  • Vahid Ghafarpour Profile Picture
    12,220 Super User 2026 Season 1 on at
     

    ** Please don't forget to close up the thread here by Like and verify it as an answer if it was solved **

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 197 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans