Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

SSRS Expression count on related dataset

Posted on by 600

Hi 

I have a report (grouped on owner) where I use the following expression to count activities on owners: 

=Sum(IIF(Fields!scheduledendValue.Value >= Today, 1, 0))

In the report I also want to count closed opportunities. I have created a seperate dataset for this. The expression I use is the following:

=Count(Lookup(Fields!ownerid.Value,Fields!ownerid.Value,Fields!opportunityid.Value,"Oppty"))

But the numbers are all wrong. Is it even possible to combine this count on the report?

Thanks for help (started with ssrs today:)

*This post is locked for comments

  • Suggested answer
    pavanmanideep Profile Picture
    pavanmanideep 1,329 on at
    RE: SSRS Expression count on related dataset

    Hi Martin,

    Please see the below link for the same requirement

    https://www.magnetismsolutions.com/blog/nathaneccles/2012/11/04/crm_2011_ssrs_lookup_function_merge_aggregate_datasets

    Hope this helps.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: SSRS Expression count on related dataset

    Hello,

    I believe what you need is LookupSet and not just Lookup - docs.microsoft.com/.../report-builder-functions-lookupset-function

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans