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,...
Unanswered

Get the sum of Columns in SSRS

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I'm trying to get the sum of the columns which was filtered by campaignid as seen on the screenshot below:

pastedimage1644919305804v1.png

I'm tried using LOOKUPSET then sum the result and I also use custom code and it does not work either due to RDL Sandboxing error.

Any help would be appreciated. Thank you in advance.

I have the same question (0)
  • Md Arshad Warsi Profile Picture
    90 on at

    Hi

    Please check you custom code.

    =Sum(IIF(Fields!scemaname.Value ="field value",1,0))

    if anything else please let us know

    juniorcrmblog.blogspot.com/

    www.youtube.com/watch

  • Jerome Vicente Profile Picture
    40 on at

    Hi,

    This is partially correct. I tried using this expression:

    =Sum(Fields!CCA.Value, "DataSet2")

    But the problem here is it will get the sum of all columns and I want to get the sum based on the selected campaignid so I tried this as well:

    =SUM(IIF(Fields!ldcampaign.Value = LOOKUP(Fields!campaignid.Value, Fields!ldcampaign.Value, 
    Fields!ldcampaign.Value, "DataSet2"), Fields!CCA.Value, 0), "DataSet2")

    Where:

    DataSet1 - campaignid

    DataSet2 - ldcampaign,CCA

  • Md Arshad Warsi Profile Picture
    90 on at

    Try with below code.

    =Sum(LookupSet(Fields!Parent_Number.Value, Fields!Parent_Number.Value,Fields!StoreCount.Value, "StoreCount"))

  • Jerome Vicente Profile Picture
    40 on at

    I tried the similar code above but this gives me a Error

    SUM(LOOKUPSET(Fields!campaignid.Value, Fields!ldcampaign.Value, Fields!CCA.Value, "DataSet2"))

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

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans