Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to select field amount using expression and minus that field amount from the total

(0) ShareShare
ReportReport
Posted on by

Hello,

I am  working with SSRS reports.

upload-error.png

As show in above image, i need to select Refund total amount value and i need to minus that amount from total same for the Received and outstanding.

How i write expression for above condition in ssrs,or any other suggestion ? 

Thank you in advance.

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: How to select field amount using expression and minus that field amount from the total

    If i want to select total amount whose charge type is refund then how i write expression for that??

    i tried below expression

    =IIf(Fields!psm_chargetype.Value="Refund",Fields!psm_totalamount.Value,Nothing)

    but it's not working

    For total i use

    =Sum(Fields!totalamountValue.Value)

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: How to select field amount using expression and minus that field amount from the total

    How is the refund stored in the database. Based on the calculation it is calculating refund as a positive number, not a negative number to calculate the total, thus showing 7670 instead of 6670.

    If Refund is stored as a negative number in the database, the SUM should show the correct amount.

    As you are using CRM Online this is Fetch Xml Report, correct?

    Can you share your expression and format for the fields in the Total Amount Column, and the Grant Total Column?

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 Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans